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_value.c')
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_value.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_value.c b/source/blender/nodes/intern/SHD_nodes/SHD_value.c
index f78480bd794..21c58419d9b 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_value.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_value.c
@@ -50,22 +50,17 @@ static int gpu_shader_value(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPU
return GPU_stack_link(mat, "set_value", in, out, vec);
}
-bNodeType sh_node_value= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ SH_NODE_VALUE,
- /* name */ "Value",
- /* width+range */ 80, 50, 120,
- /* class+opts */ NODE_CLASS_INPUT, NODE_OPTIONS,
- /* input sock */ NULL,
- /* output sock */ sh_node_value_out,
- /* storage */ "",
- /* execfunc */ node_shader_exec_value,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copystoragefunc */ NULL,
- /* id */ NULL, NULL, NULL,
- /* gpufunc */ gpu_shader_value
-
-};
+void register_node_type_sh_value(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS,
+ NULL, sh_node_value_out);
+ node_type_size(&ntype, 80, 50, 120);
+ node_type_exec(&ntype, node_shader_exec_value);
+ node_type_gpu(&ntype, gpu_shader_value);
+
+ nodeRegisterType(lb, &ntype);
+}
+