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

Martijn Versteegh noreply at git.blender.org
Mon Nov 28 14:55:10 CET 2022


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

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 ddc87e3dac4..11e7f40c1c5 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