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/SHD_nodes/SHD_mixRgb.c')
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c b/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c
index 4975c6b9b59..a8dcf684400 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c
@@ -71,21 +71,16 @@ static int gpu_shader_mix_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, G
}
-bNodeType sh_node_mix_rgb= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ SH_NODE_MIX_RGB,
- /* name */ "Mix",
- /* width+range */ 100, 60, 150,
- /* class+opts */ NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- /* input sock */ sh_node_mix_rgb_in,
- /* output sock */ sh_node_mix_rgb_out,
- /* storage */ "",
- /* execfunc */ node_shader_exec_mix_rgb,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copystoragefunc */ NULL,
- /* id */ NULL, NULL, NULL,
- /* gpufunc */ gpu_shader_mix_rgb
-
-};
+void register_node_type_sh_mix_rgb(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
+ sh_node_mix_rgb_in, sh_node_mix_rgb_out);
+ node_type_size(&ntype, 100, 60, 150);
+ node_type_exec(&ntype, node_shader_exec_mix_rgb);
+ node_type_gpu(&ntype, gpu_shader_mix_rgb);
+
+ nodeRegisterType(lb, &ntype);
+}
+