~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/nodes/intern/TEX_nodes/TEX_at.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 *
3
 
 * ***** BEGIN GPL LICENSE BLOCK *****
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU General Public License
7
 
 * as published by the Free Software Foundation; either version 2
8
 
 * of the License, or (at your option) any later version. 
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software Foundation,
17
 
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
 
 *
19
 
 * The Original Code is Copyright (C) 2005 Blender Foundation.
20
 
 * All rights reserved.
21
 
 *
22
 
 * The Original Code is: all of this file.
23
 
 *
24
 
 * Contributor(s): R Allen
25
 
 *
26
 
 * ***** END GPL LICENSE BLOCK *****
27
 
 */
28
 
 
29
 
#include "../TEX_util.h"                                                   
30
 
 
31
 
static bNodeSocketType inputs[]= {
32
 
        { SOCK_RGBA,   1, "Texture",     0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
33
 
        { SOCK_VECTOR, 1, "Coordinates", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f },
34
 
        { -1, 0, "" }
35
 
};
36
 
static bNodeSocketType outputs[]= {
37
 
        { SOCK_RGBA,   0, "Texture",     0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
38
 
        { -1, 0, "" }
39
 
};
40
 
 
41
 
static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
42
 
{
43
 
        TexParams np = *p;
44
 
        float new_co[3];
45
 
        np.co = new_co;
46
 
        
47
 
        tex_input_vec(new_co, in[1], p, thread);
48
 
        tex_input_rgba(out, in[0], &np, thread);
49
 
}
50
 
 
51
 
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
52
 
{
53
 
        tex_output(node, in, out[0], &colorfn, data);
54
 
}
55
 
 
56
 
bNodeType tex_node_at = {
57
 
        /* *next,*prev     */  NULL, NULL,
58
 
        /* type code       */  TEX_NODE_AT,
59
 
        /* name            */  "At",
60
 
        /* width+range     */  100, 60, 150,
61
 
        /* class+opts      */  NODE_CLASS_DISTORT, 0,
62
 
        /* input sock      */  inputs,
63
 
        /* output sock     */  outputs,
64
 
        /* storage         */  "", 
65
 
        /* execfunc        */  exec,
66
 
        /* butfunc         */  NULL,
67
 
        /* initfunc        */  NULL,
68
 
        /* freestoragefunc */  NULL,
69
 
        /* copystoragefunc */  NULL,
70
 
        /* id              */  NULL   
71
 
        
72
 
};