diff options
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_value.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_value.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_value.c b/source/blender/nodes/intern/CMP_nodes/CMP_value.c index 14a3b6fe15c..bd5f6853dc5 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_value.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_value.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -35,27 +35,23 @@ static bNodeSocketType cmp_node_value_out[]= { { -1, 0, "" } }; -static void node_composit_exec_value(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) { bNodeSocket *sock= node->outputs.first; out[0]->vec[0]= sock->ns.vec[0]; } -bNodeType cmp_node_value= { - /* *next,*prev */ NULL, NULL, - /* type code */ CMP_NODE_VALUE, - /* name */ "Value", - /* width+range */ 80, 40, 120, - /* class+opts */ NODE_CLASS_INPUT, NODE_OPTIONS, - /* input sock */ NULL, - /* output sock */ cmp_node_value_out, - /* storage */ "", - /* execfunc */ node_composit_exec_value, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL -}; +void register_node_type_cmp_value(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS, + NULL, cmp_node_value_out); + node_type_size(&ntype, 80, 40, 120); + node_type_exec(&ntype, node_composit_exec_value); + + nodeRegisterType(lb, &ntype); +} + |