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/NOD_node_declaration.hh
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/NOD_node_declaration.hh')
-rw-r--r--source/blender/nodes/NOD_node_declaration.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_node_declaration.hh b/source/blender/nodes/NOD_node_declaration.hh
index 4ad1bcad885..113e8ffc93d 100644
--- a/source/blender/nodes/NOD_node_declaration.hh
+++ b/source/blender/nodes/NOD_node_declaration.hh
@@ -95,6 +95,7 @@ class SocketDeclaration {
bool compact_ = false;
bool is_multi_input_ = false;
bool no_mute_links_ = false;
+ bool is_unavailable_ = false;
bool is_attribute_name_ = false;
bool is_default_link_socket_ = false;
@@ -185,12 +186,23 @@ class SocketDeclarationBuilder : public BaseSocketDeclarationBuilder {
decl_->description_ = std::move(value);
return *(Self *)this;
}
+
Self &no_muted_links(bool value = true)
{
decl_->no_mute_links_ = value;
return *(Self *)this;
}
+ /**
+ * Used for sockets that are always unavailable and should not be seen by the user.
+ * Ideally, no new calls to this method should be added over time.
+ */
+ Self &unavailable(bool value = true)
+ {
+ decl_->is_unavailable_ = value;
+ return *(Self *)this;
+ }
+
Self &is_attribute_name(bool value = true)
{
decl_->is_attribute_name_ = value;