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:
authorJacques Lucke <jacques@blender.org>2021-09-24 17:42:07 +0300
committerJacques Lucke <jacques@blender.org>2021-09-24 17:42:20 +0300
commit4a2c63f4bd7e3cbb8cd80655270f3184d660e51d (patch)
tree731a17558099cd7d38c0f426a0628566d7a1291c
parent90b410fe74b8710eaaa0372cb4f2d7da60f002a7 (diff)
Nodes: hide socket value when input is a field implicitly
-rw-r--r--source/blender/nodes/NOD_node_declaration.hh1
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_set_position.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_noise.cc2
3 files changed, 3 insertions, 2 deletions
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);