diff options
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_distance.c')
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/TEX_distance.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c index e0fee3e3153..887fbd1be90 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c @@ -41,7 +41,7 @@ static bNodeSocketType outputs[]= { { -1, 0, "" } }; -static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +static void valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) { float co1[3], co2[3]; @@ -56,21 +56,15 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) tex_output(node, in, out[0], &valuefn, data); } -bNodeType tex_node_distance= { - /* *next,*prev */ NULL, NULL, - /* type code */ TEX_NODE_DISTANCE, - /* name */ "Distance", - /* width+range */ 120, 110, 160, - /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS, - /* input sock */ inputs, - /* output sock */ outputs, - /* storage */ "node_distance", - /* execfunc */ exec, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL -}; - - +void register_node_type_tex_distance(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS, + inputs, outputs); + node_type_size(&ntype, 120, 110, 160); + node_type_storage(&ntype, "node_distance", NULL, NULL); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} |