diff options
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes/SHD_rgb.c')
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_rgb.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c b/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c index 71af58beb67..821254ad832 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -35,7 +35,7 @@ static bNodeSocketType sh_node_rgb_out[]= { { -1, 0, "" } }; -static void node_shader_exec_rgb(void *data, bNode *node, bNodeStack **in, bNodeStack **out) +static void node_shader_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) { bNodeSocket *sock= node->outputs.first; @@ -50,21 +50,16 @@ static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNo return GPU_stack_link(mat, "set_rgba", in, out, vec); } -bNodeType sh_node_rgb= { - /* *next,*prev */ NULL, NULL, - /* type code */ SH_NODE_RGB, - /* name */ "RGB", - /* width+range */ 140, 80, 140, - /* class+opts */ NODE_CLASS_INPUT, NODE_OPTIONS, - /* input sock */ NULL, - /* output sock */ sh_node_rgb_out, - /* storage */ "", - /* execfunc */ node_shader_exec_rgb, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL, NULL, NULL, - /* gpufunc */ gpu_shader_rgb - -}; +void register_node_type_sh_rgb(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS, + NULL, sh_node_rgb_out); + node_type_size(&ntype, 140, 80, 140); + node_type_exec(&ntype, node_shader_exec_rgb); + node_type_gpu(&ntype, gpu_shader_rgb); + + nodeRegisterType(lb, &ntype); +} + |