[Bf-blender-cvs] [31a4fb42d42] master: Fix T101613: Muted Mix node wrongly connects to Factor socket

Charlie Jolly noreply at git.blender.org
Wed Oct 5 14:20:42 CEST 2022


Commit: 31a4fb42d42af66ce6436803cad6d30173f34245
Author: Charlie Jolly
Date:   Wed Oct 5 13:19:19 2022 +0100
Branches: master
https://developer.blender.org/rB31a4fb42d42af66ce6436803cad6d30173f34245

Fix T101613: Muted Mix node wrongly connects to Factor socket

T101613: Muting/ctrl+x deleting the new mix node in Float mode
passes through the wrong input.

Fix by setting no_muted_links() on Factor sockets.

===================================================================

M	source/blender/nodes/shader/nodes/node_shader_mix.cc

===================================================================

diff --git a/source/blender/nodes/shader/nodes/node_shader_mix.cc b/source/blender/nodes/shader/nodes/node_shader_mix.cc
index 5ab26100a48..2efd57155b9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mix.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_mix.cc
@@ -23,11 +23,13 @@ static void sh_node_mix_declare(NodeDeclarationBuilder &b)
 {
   b.is_function_node();
   b.add_input<decl::Float>(N_("Factor"), "Factor_Float")
+      .no_muted_links()
       .default_value(0.5f)
       .min(0.0f)
       .max(1.0f)
       .subtype(PROP_FACTOR);
   b.add_input<decl::Vector>(N_("Factor"), "Factor_Vector")
+      .no_muted_links()
       .default_value(float3(0.5f))
       .subtype(PROP_FACTOR);



More information about the Bf-blender-cvs mailing list