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/shader/nodes/node_shader_holdout.cc')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_holdout.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_holdout.cc b/source/blender/nodes/shader/nodes/node_shader_holdout.cc
index 5a939d0b4f3..4f6f8a639de 100644
--- a/source/blender/nodes/shader/nodes/node_shader_holdout.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_holdout.cc
@@ -21,16 +21,10 @@
namespace blender::nodes::node_shader_holdout_cc {
-/* **************** OUTPUT ******************** */
-
-static bNodeSocketTemplate sh_node_holdout_in[] = {
- {-1, ""},
-};
-
-static bNodeSocketTemplate sh_node_holdout_out[] = {
- {SOCK_SHADER, N_("Holdout")},
- {-1, ""},
-};
+static void node_declare(NodeDeclarationBuilder &b)
+{
+ b.add_output<decl::Shader>(N_("Holdout"));
+}
static int gpu_shader_rgb(GPUMaterial *mat,
bNode *node,
@@ -51,7 +45,7 @@ void register_node_type_sh_holdout()
static bNodeType ntype;
sh_node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER);
- node_type_socket_templates(&ntype, file_ns::sh_node_holdout_in, file_ns::sh_node_holdout_out);
+ ntype.declare = file_ns::node_declare;
node_type_gpu(&ntype, file_ns::gpu_shader_rgb);
nodeRegisterType(&ntype);