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_invert.c')
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_invert.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c b/source/blender/nodes/intern/SHD_nodes/SHD_invert.c
index 73fccf7cd0b..9929afd0bc1 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_invert.c
@@ -69,21 +69,17 @@ static int gpu_shader_invert(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack
return GPU_stack_link(mat, "invert", in, out);
}
-bNodeType sh_node_invert= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ SH_NODE_INVERT,
- /* name */ "Invert",
- /* width+range */ 90, 80, 100,
- /* class+opts */ NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- /* input sock */ sh_node_invert_in,
- /* output sock */ sh_node_invert_out,
- /* storage */ "",
- /* execfunc */ node_shader_exec_invert,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copystoragefunc */ NULL,
- /* id */ NULL, NULL, NULL,
- /* gpufunc */ gpu_shader_invert
-};
+void register_node_type_sh_invert(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
+ sh_node_invert_in, sh_node_invert_out);
+ node_type_size(&ntype, 90, 80, 100);
+ node_type_exec(&ntype, node_shader_exec_invert);
+ node_type_gpu(&ntype, gpu_shader_invert);
+
+ nodeRegisterType(lb, &ntype);
+}
+