Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_gamma.c')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_gamma.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
index c0e524a3ae9..98af5bff2ec 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
@@ -42,7 +42,7 @@ static bNodeSocketType cmp_node_gamma_out[]= {
{ -1, 0, "" }
};
-static void do_gamma(bNode *node, float *out, float *in, float *fac)
+static void do_gamma(bNode *UNUSED(node), float *out, float *in, float *fac)
{
int i=0;
for(i=0; i<3; i++) {
@@ -51,7 +51,7 @@ static void do_gamma(bNode *node, float *out, float *in, float *fac)
}
out[3] = in[3];
}
-static void node_composit_exec_gamma(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
+static void node_composit_exec_gamma(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
/* stack order in: Fac, Image */
/* stack order out: Image */
@@ -72,21 +72,14 @@ static void node_composit_exec_gamma(void *data, bNode *node, bNodeStack **in, b
}
}
-bNodeType cmp_node_gamma= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ CMP_NODE_GAMMA,
- /* name */ "Gamma",
- /* width+range */ 140, 100, 320,
- /* class+opts */ NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- /* input sock */ cmp_node_gamma_in,
- /* output sock */ cmp_node_gamma_out,
- /* storage */ "",
- /* execfunc */ node_composit_exec_gamma,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copysotragefunc */ NULL,
- /* id */ NULL
-};
-
-
+void register_node_type_cmp_gamma(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
+ cmp_node_gamma_in, cmp_node_gamma_out);
+ node_type_size(&ntype, 140, 100, 320);
+ node_type_exec(&ntype, node_composit_exec_gamma);
+
+ nodeRegisterType(lb, &ntype);
+}