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
This commit is contained in:
Martijn Versteegh 2022-11-15 21:47:57 +01:00 committed by Martijn Versteegh
parent 8831c6f056
commit c0df88f3b5
1 changed files with 1 additions and 1 deletions

View File

@ -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) {