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-11-04 16:44:21 +0300
committerJacques Lucke <jacques@blender.org>2021-11-04 16:44:21 +0300
commitbe4478d1f8b6c75b50c951f02cf0116f78e68d6d (patch)
tree605122f23a1c7fb2c08d33c0d83aa42f2c550c90 /source/blender/nodes/shader
parentff4959eeaa5368d79f15d482da6576a1ccba5dca (diff)
Fix T92814: improve automatic linking when inserting Float Curve node
This solves the issue in a more general that can also be used to solve similar issues for other nodes in the future. Nodes can specify their "main" socket in their declaration so that we don't have to rely on heuristics. Differential Revision: https://developer.blender.org/D13108
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_curves.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.cc b/source/blender/nodes/shader/nodes/node_shader_curves.cc
index f8f0ee97eae..7ce5150bf85 100644
--- a/source/blender/nodes/shader/nodes/node_shader_curves.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_curves.cc
@@ -357,7 +357,7 @@ static void sh_node_curve_float_declare(NodeDeclarationBuilder &b)
.max(1.0f)
.default_value(1.0f)
.subtype(PROP_FACTOR);
- b.add_input<decl::Float>(N_("Value")).default_value(1.0f);
+ b.add_input<decl::Float>(N_("Value")).default_value(1.0f).is_default_link_socket();
b.add_output<decl::Float>(N_("Value"));
};