Geometry Nodes: reduce Bake node weight in link-drag-search

Currently, when using link-drag-search and searching for "Value" shows the bake
node first. This is annoying because it's rarely what one means. It's shown
first because it's a shorter search entry.

This patch reduces the weight of that entry so that the Value node shows up
first.

Pull Request: https://projects.blender.org/blender/blender/pulls/139156
This commit is contained in:
Jacques Lucke
2025-05-20 18:36:56 +02:00
parent 66e96bf134
commit 416b40af05

View File

@@ -557,12 +557,15 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
return;
}
params.add_item(IFACE_("Value"), [type](LinkSearchOpParams &params) {
bNode &node = params.add_node("GeometryNodeBake");
socket_items::add_item_with_socket_type_and_name<BakeItemsAccessor>(
node, type, params.socket.name);
params.update_and_connect_available_socket(node, params.socket.name);
});
params.add_item(
IFACE_("Value"),
[type](LinkSearchOpParams &params) {
bNode &node = params.add_node("GeometryNodeBake");
socket_items::add_item_with_socket_type_and_name<BakeItemsAccessor>(
node, type, params.socket.name);
params.update_and_connect_available_socket(node, params.socket.name);
},
-1);
}
static const bNodeSocket *node_internally_linked_input(const bNodeTree & /*tree*/,