diff options
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c | 67 |
1 files changed, 29 insertions, 38 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c index 0ac47c58ab3..469425c4ace 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -43,7 +43,7 @@ static bNodeSocketType cmp_node_sephsva_out[]= { { -1, 0, "" } }; -static void do_sephsva(bNode *node, float *out, float *in) +static void do_sephsva(bNode *UNUSED(node), float *out, float *in) { float h, s, v; @@ -55,7 +55,7 @@ static void do_sephsva(bNode *node, float *out, float *in) out[3]= in[3]; } -static void node_composit_exec_sephsva(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) { /* stack order out: bw channels */ /* stack order in: col */ @@ -96,23 +96,18 @@ static void node_composit_exec_sephsva(void *data, bNode *node, bNodeStack **in, } } -bNodeType cmp_node_sephsva= { - /* *next,*prev */ NULL, NULL, - /* type code */ CMP_NODE_SEPHSVA, - /* name */ "Separate HSVA", - /* width+range */ 80, 40, 140, - /* class+opts */ NODE_CLASS_CONVERTOR, 0, - /* input sock */ cmp_node_sephsva_in, - /* output sock */ cmp_node_sephsva_out, - /* storage */ "", - /* execfunc */ node_composit_exec_sephsva, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL - -}; +void register_node_type_cmp_sephsva(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0, + cmp_node_sephsva_in, cmp_node_sephsva_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_sephsva); + + nodeRegisterType(lb, &ntype); +} + /* **************** COMBINE HSVA ******************** */ static bNodeSocketType cmp_node_combhsva_in[]= { @@ -127,7 +122,7 @@ static bNodeSocketType cmp_node_combhsva_out[]= { { -1, 0, "" } }; -static void do_comb_hsva(bNode *node, float *out, float *in1, float *in2, float *in3, float *in4) +static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) { float r,g,b; hsv_to_rgb(in1[0], in2[0], in3[0], &r, &g, &b); @@ -138,7 +133,7 @@ static void do_comb_hsva(bNode *node, float *out, float *in1, float *in2, float out[3] = in4[0]; } -static void node_composit_exec_combhsva(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +static void node_composit_exec_combhsva(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) { /* stack order out: 1 rgba channels */ /* stack order in: 4 value channels */ @@ -171,21 +166,17 @@ static void node_composit_exec_combhsva(void *data, bNode *node, bNodeStack **in } } -bNodeType cmp_node_combhsva= { - /* *next,*prev */ NULL, NULL, - /* type code */ CMP_NODE_COMBHSVA, - /* name */ "Combine HSVA", - /* width+range */ 80, 40, 140, - /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS, - /* input sock */ cmp_node_combhsva_in, - /* output sock */ cmp_node_combhsva_out, - /* storage */ "", - /* execfunc */ node_composit_exec_combhsva, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL -}; +void register_node_type_cmp_combhsva(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS, + cmp_node_combhsva_in, cmp_node_combhsva_out); + node_type_size(&ntype, 80, 40, 140); + node_type_exec(&ntype, node_composit_exec_combhsva); + + nodeRegisterType(lb, &ntype); +} + |