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 | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c index 5d624205f43..887fbd1be90 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_distance.c @@ -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); +} |