Geometry Nodes: give bundle sockets the dynamic structure type

This allows storing fields etc. in bundles.
This commit is contained in:
Jacques Lucke
2025-06-11 07:18:06 +02:00
parent 13fa79aa37
commit 1568117aaf
2 changed files with 5 additions and 2 deletions

View File

@@ -31,7 +31,9 @@ static void node_declare(NodeDeclarationBuilder &b)
const StringRef name = item.name ? item.name : "";
const std::string identifier = CombineBundleItemsAccessor::socket_identifier_for_item(item);
b.add_input(socket_type, name, identifier)
.socket_name_ptr(&tree->id, CombineBundleItemsAccessor::item_srna, &item, "name");
.socket_name_ptr(&tree->id, CombineBundleItemsAccessor::item_srna, &item, "name")
.supports_field()
.structure_type(StructureType::Dynamic);
}
}
b.add_input<decl::Extend>("", "__extend__");

View File

@@ -36,7 +36,8 @@ static void node_declare(NodeDeclarationBuilder &b)
b.add_output(socket_type, name, identifier)
.socket_name_ptr(&tree->id, SeparateBundleItemsAccessor::item_srna, &item, "name")
.propagate_all()
.reference_pass_all();
.reference_pass_all()
.structure_type(StructureType::Dynamic);
}
}
b.add_output<decl::Extend>("", "__extend__");