diff options
author | Hans Goudey <h.goudey@me.com> | 2021-09-23 01:34:09 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-09-23 01:34:09 +0300 |
commit | 79bcc19240258fe697b583376f59902c3235691c (patch) | |
tree | ebb15ffda6a3381435551924ae6dadeca1bd80d3 /source/blender/nodes/intern/node_declaration.cc | |
parent | 6fb4c8f040f87bed4d6c69e3a718114eef91b7e1 (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/intern/node_declaration.cc')
-rw-r--r-- | source/blender/nodes/intern/node_declaration.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/node_declaration.cc b/source/blender/nodes/intern/node_declaration.cc index f6b6cc49b2e..8a38b68ec59 100644 --- a/source/blender/nodes/intern/node_declaration.cc +++ b/source/blender/nodes/intern/node_declaration.cc @@ -69,6 +69,7 @@ void SocketDeclaration::set_common_flags(bNodeSocket &socket) const SET_FLAG_FROM_TEST(socket.flag, hide_value_, SOCK_HIDE_VALUE); SET_FLAG_FROM_TEST(socket.flag, hide_label_, SOCK_HIDE_LABEL); SET_FLAG_FROM_TEST(socket.flag, is_multi_input_, SOCK_MULTI_INPUT); + SET_FLAG_FROM_TEST(socket.flag, no_mute_links_, SOCK_NO_INTERNAL_LINK); } bool SocketDeclaration::matches_common_data(const bNodeSocket &socket) const @@ -88,6 +89,9 @@ bool SocketDeclaration::matches_common_data(const bNodeSocket &socket) const if (((socket.flag & SOCK_MULTI_INPUT) != 0) != is_multi_input_) { return false; } + if (((socket.flag & SOCK_NO_INTERNAL_LINK) != 0) != no_mute_links_) { + return false; + } return true; } |