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/TEX_nodes/TEX_valToRgb.c')
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c56
1 files changed, 23 insertions, 33 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c b/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
index fcaa9550efa..f23baffb0ee 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
@@ -58,23 +58,19 @@ static void valtorgb_init(bNode *node)
node->storage = add_colorband(1);
}
-bNodeType tex_node_valtorgb= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ TEX_NODE_VALTORGB,
- /* name */ "ColorRamp",
- /* width+range */ 240, 200, 300,
- /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- /* input sock */ valtorgb_in,
- /* output sock */ valtorgb_out,
- /* storage */ "ColorBand",
- /* execfunc */ valtorgb_exec,
- /* butfunc */ NULL,
- /* initfunc */ valtorgb_init,
- /* freestoragefunc */ node_free_standard_storage,
- /* copystoragefunc */ node_copy_standard_storage,
- /* id */ NULL
+void register_node_type_tex_valtorgb(ListBase *lb)
+{
+ static bNodeType ntype;
-};
+ node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
+ valtorgb_in, valtorgb_out);
+ node_type_size(&ntype, 240, 200, 300);
+ node_type_init(&ntype, valtorgb_init);
+ node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
+ node_type_exec(&ntype, valtorgb_exec);
+
+ nodeRegisterType(lb, &ntype);
+}
/* **************** RGBTOBW ******************** */
static bNodeSocketType rgbtobw_in[]= {
@@ -100,21 +96,15 @@ static void rgbtobw_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **
tex_output(node, in, out[0], &rgbtobw_valuefn, data);
}
-bNodeType tex_node_rgbtobw= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ TEX_NODE_RGBTOBW,
- /* name */ "RGB to BW",
- /* width+range */ 80, 40, 120,
- /* class+opts */ NODE_CLASS_CONVERTOR, 0,
- /* input sock */ rgbtobw_in,
- /* output sock */ rgbtobw_out,
- /* storage */ "",
- /* execfunc */ rgbtobw_exec,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copystoragefunc */ NULL,
- /* id */ NULL
-
-};
+void register_node_type_tex_rgbtobw(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0,
+ rgbtobw_in, rgbtobw_out);
+ node_type_size(&ntype, 80, 40, 120);
+ node_type_exec(&ntype, rgbtobw_exec);
+
+ nodeRegisterType(lb, &ntype);
+}