[Bf-blender-cvs] [c0df88f3b51] blender-v3.4-release: Fix: Link drag search crash with incorrect socket name in switch node

Martijn Versteegh noreply at git.blender.org
Tue Nov 15 22:12:52 CET 2022


Commit: c0df88f3b51cccc3447bf01242cbceb8a949401d
Author: Martijn Versteegh
Date:   Tue Nov 15 21:47:57 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rBc0df88f3b51cccc3447bf01242cbceb8a949401d

Fix: Link drag search crash with incorrect socket name in switch node

When dragging out a boolean noodle, releasing and choosing
'switch > Switch' from the search popup, the code would mistakenly
search for 'Start' instead of 'Switch'.

Also the function called was not exactly the right one, leading to the
node being marked as invalid.

Reviewed By: Jacques Lucke

Differential Revision: https://developer.blender.org/D16512

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

M	source/blender/nodes/geometry/nodes/node_geo_switch.cc

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

diff --git a/source/blender/nodes/geometry/nodes/node_geo_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_switch.cc
index 36be68f1a22..6a001c00fd0 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_switch.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_switch.cc
@@ -123,7 +123,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
     if (params.other_socket().type == SOCK_BOOLEAN) {
       params.add_item(IFACE_("Switch"), [](LinkSearchOpParams &params) {
         bNode &node = params.add_node("GeometryNodeSwitch");
-        params.connect_available_socket(node, "Start");
+        params.update_and_connect_available_socket(node, "Switch");
       });
     }
     params.add_item(IFACE_("False"), [](LinkSearchOpParams &params) {



More information about the Bf-blender-cvs mailing list