diff options
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc index 22a9e4a0c33..be0baa706af 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc @@ -96,17 +96,14 @@ static void node_update(bNodeTree *ntree, bNode *node) static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms) { - const bNodeType &node_type = params.node_type(); - if (params.other_socket().type == SOCK_GEOMETRY) { - params.add_item(IFACE_("Geometry"), [node_type](LinkSearchOpParams ¶ms) { - bNode &node = params.add_node(node_type); - params.connect_available_socket(node, "Geometry"); - }); - } + const NodeDeclaration &declaration = *params.node_type().fixed_declaration; + search_link_ops_for_declarations(params, declaration.inputs().take_front(1)); + search_link_ops_for_declarations(params, declaration.outputs().take_front(1)); + const bNodeType &node_type = params.node_type(); const std::optional<CustomDataType> type = node_data_type_to_custom_data_type( (eNodeSocketDatatype)params.other_socket().type); - if (type) { + if (type && *type != CD_PROP_STRING) { if (params.in_out() == SOCK_OUT) { params.add_item(IFACE_("Attribute"), [node_type, type](LinkSearchOpParams ¶ms) { bNode &node = params.add_node(node_type); |