Commit: 4a2c63f4bd7e3cbb8cd80655270f3184d660e51d
Author: Jacques Lucke
Date: Fri Sep 24 16:42:07 2021 +0200
Branches: master
https://developer.blender.org/rB4a2c63f4bd7e3cbb8cd80655270f3184d660e51d
Nodes: hide socket value when input is a field implicitly
===================================================================
M source/blender/nodes/NOD_node_declaration.hh
M source/blender/nodes/geometry/nodes/node_geo_set_position.cc
M source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
===================================================================
diff --git a/source/blender/nodes/NOD_node_declaration.hh
b/source/blender/nodes/NOD_node_declaration.hh
index 32e63ffb2df..6780dfcad59 100644
--- a/source/blender/nodes/NOD_node_declaration.hh
+++ b/source/blender/nodes/NOD_node_declaration.hh
@@ -202,6 +202,7 @@ class SocketDeclarationBuilder : public
BaseSocketDeclarationBuilder {
/** The input supports a field and is a field by default when nothing is
connected. */
Self &implicit_field()
{
+ this->hide_value();
decl_->input_field_type_ = InputSocketFieldType::Implicit;
return *(Self *)this;
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc
b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc
index 78bdac1b01b..be923fdccb0 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc
@@ -23,7 +23,7 @@ namespace blender::nodes {
static void geo_node_set_position_declare(NodeDeclarationBuilder &b)
{
b.add_input<decl::Geometry>("Geometry");
- b.add_input<decl::Vector>("Position").hide_value().implicit_field();
+ b.add_input<decl::Vector>("Position").implicit_field();
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().supports_field();
b.add_output<decl::Geometry>("Geometry");
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
index 5bf5e0f9876..6ffc8979815 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
@@ -26,7 +26,7 @@ namespace blender::nodes {
static void sh_node_tex_noise_declare(NodeDeclarationBuilder &b)
{
b.is_function_node();
- b.add_input<decl::Vector>("Vector").hide_value().implicit_field();
+ b.add_input<decl::Vector>("Vector").implicit_field();
b.add_input<decl::Float>("W").min(-1000.0f).max(1000.0f);
b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f);
b.add_input<decl::Float>("Detail").min(0.0f).max(16.0f).default_value(2.0f);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs