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:
authorAaron Carlisle <Blendify>2021-12-25 19:12:43 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-12-25 19:13:15 +0300
commitfbd01624e3feb10add9d04672a3db0f52817423a (patch)
tree292e376c10e48f1b0f74f39b5f8b273004f1f743 /source/blender/nodes/intern
parentc5862da5ad990bd72a6f713c52f7d74416bce16a (diff)
Shader Nodes: Convert bump node to use new socket builder
This node is a bit special in that it uses two internal sockets for a hack for Eevee; see rBffd5e1e6acd296a187e7af016f9d7f8a9f209f87 As a result, the `SOCK_UNAVAIL` flag is exposed to socket builder API. Reviewed By: JacquesLucke, fclem Differential Revision: https://developer.blender.org/D13496
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/node_declaration.cc4
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 75d47cfd386..28e8bf5a4b7 100644
--- a/source/blender/nodes/intern/node_declaration.cc
+++ b/source/blender/nodes/intern/node_declaration.cc
@@ -63,6 +63,7 @@ void SocketDeclaration::set_common_flags(bNodeSocket &socket) const
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);
+ SET_FLAG_FROM_TEST(socket.flag, is_unavailable_, SOCK_UNAVAIL);
}
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_NO_INTERNAL_LINK) != 0) != no_mute_links_) {
return false;
}
+ if (((socket.flag & SOCK_UNAVAIL) != 0) != is_unavailable_) {
+ return false;
+ }
return true;
}