diff options
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_coord.c')
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/TEX_coord.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c b/source/blender/nodes/intern/TEX_nodes/TEX_coord.c index 68e892ce77c..6f208b48eee 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_coord.c @@ -1,4 +1,4 @@ -/** +/* * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -33,7 +33,7 @@ static bNodeSocketType outputs[]= { { -1, 0, "" } }; -static void vectorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +static void vectorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **UNUSED(in), short UNUSED(thread)) { out[0] = p->co[0]; out[1] = p->co[1]; @@ -45,20 +45,15 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) tex_output(node, in, out[0], &vectorfn, data); } -bNodeType tex_node_coord= { - /* *next,*prev */ NULL, NULL, - /* type code */ TEX_NODE_COORD, - /* name */ "Coordinates", - /* width+range */ 120, 110, 160, - /* class+opts */ NODE_CLASS_INPUT, NODE_OPTIONS, - /* input sock */ NULL, - /* output sock */ outputs, - /* storage */ "node_coord", - /* execfunc */ exec, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL -}; - +void register_node_type_tex_coord(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS, + NULL, outputs); + node_type_size(&ntype, 120, 110, 160); + node_type_storage(&ntype, "node_coord", NULL, NULL); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} |