diff options
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c')
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c b/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c index 46aefe5ad47..67fb068870c 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c @@ -39,7 +39,7 @@ static bNodeSocketType outputs[]= { { -1, 0, "" } }; -static void normalfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread) +static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread) { float new_co[3]; float *co = p->co; @@ -75,20 +75,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) tex_output(node, in, out[0], &normalfn, data); } -bNodeType tex_node_valtonor = { - /* *next,*prev */ NULL, NULL, - /* type code */ TEX_NODE_VALTONOR, - /* name */ "Value to Normal", - /* width+range */ 90, 80, 100, - /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS, - /* input sock */ inputs, - /* output sock */ outputs, - /* storage */ "", - /* execfunc */ exec, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL -}; - +void register_node_type_tex_valtonor(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS, + inputs, outputs); + node_type_size(&ntype, 90, 80, 100); + node_type_exec(&ntype, exec); + + nodeRegisterType(lb, &ntype); +} |