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:
authorHans Goudey <h.goudey@me.com>2021-09-23 01:34:09 +0300
committerHans Goudey <h.goudey@me.com>2021-09-23 01:34:09 +0300
commit79bcc19240258fe697b583376f59902c3235691c (patch)
treeebb15ffda6a3381435551924ae6dadeca1bd80d3 /source/blender/nodes/NOD_node_declaration.hh
parent6fb4c8f040f87bed4d6c69e3a718114eef91b7e1 (diff)
Cleanup: Move more shader nodes to socket declaration API
I had to add `no_muted_links` to the declaration API. The name could change there, but I think it's more obvious than "internal"
Diffstat (limited to 'source/blender/nodes/NOD_node_declaration.hh')
-rw-r--r--source/blender/nodes/NOD_node_declaration.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_node_declaration.hh b/source/blender/nodes/NOD_node_declaration.hh
index d64b76ccbb9..8e9e72bf4c8 100644
--- a/source/blender/nodes/NOD_node_declaration.hh
+++ b/source/blender/nodes/NOD_node_declaration.hh
@@ -37,6 +37,7 @@ class SocketDeclaration {
bool hide_label_ = false;
bool hide_value_ = false;
bool is_multi_input_ = false;
+ bool no_mute_links_ = false;
friend NodeDeclarationBuilder;
template<typename SocketDecl> friend class SocketDeclarationBuilder;
@@ -93,6 +94,12 @@ class SocketDeclarationBuilder : public BaseSocketDeclarationBuilder {
decl_->is_multi_input_ = value;
return *(Self *)this;
}
+
+ Self &no_muted_links(bool value = true)
+ {
+ decl_->no_mute_links_ = value;
+ return *(Self *)this;
+ }
};
using SocketDeclarationPtr = std::unique_ptr<SocketDeclaration>;