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_output.c')
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_output.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_output.c b/source/blender/nodes/intern/SHD_nodes/SHD_output.c
index 740639b6ab4..d61e9def144 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_output.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_output.c
@@ -36,7 +36,7 @@ static bNodeSocketType sh_node_output_in[]= {
{ -1, 0, "" }
};
-static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
+static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out))
{
if(data) {
ShadeInput *shi= ((ShaderCallData *)data)->shi;
@@ -62,7 +62,7 @@ static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bN
}
}
-static int gpu_shader_output(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
+static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
{
GPUNodeLink *outlink;
@@ -75,22 +75,17 @@ static int gpu_shader_output(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GP
return 1;
}
-bNodeType sh_node_output= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ SH_NODE_OUTPUT,
- /* name */ "Output",
- /* width+range */ 80, 60, 200,
- /* class+opts */ NODE_CLASS_OUTPUT, NODE_PREVIEW,
- /* input sock */ sh_node_output_in,
- /* output sock */ NULL,
- /* storage */ "",
- /* execfunc */ node_shader_exec_output,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copystoragefunc */ NULL,
- /* id */ NULL, NULL, NULL,
- /* gpufunc */ gpu_shader_output
-
-};
+void register_node_type_sh_output(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW,
+ sh_node_output_in, NULL);
+ node_type_size(&ntype, 80, 60, 200);
+ node_type_exec(&ntype, node_shader_exec_output);
+ node_type_gpu(&ntype, gpu_shader_output);
+
+ nodeRegisterType(lb, &ntype);
+}
+