From 3b10d8a9c4a89d4966b8081607e5f1559d85478a Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 25 Dec 2024 17:00:12 +0500 Subject: [PATCH] Fix error loading document references in ifc2x3 after 1655341 --- src/bonsai/bonsai/tool/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/document.py b/src/bonsai/bonsai/tool/document.py index 6e5f47939a..aed65a4986 100644 --- a/src/bonsai/bonsai/tool/document.py +++ b/src/bonsai/bonsai/tool/document.py @@ -102,7 +102,7 @@ class Document(bonsai.core.tool.Document): def import_references(cls, document: ifcopenshell.entity_instance) -> None: props = bpy.context.scene.BIMDocumentProperties is_ifc2x3 = tool.Ifc.get_schema() == "IFC2X3" - references = (document.DocumentReference or []) if is_ifc2x3 else document.HasDocumentReferences + references = (document.DocumentReferences or []) if is_ifc2x3 else document.HasDocumentReferences for element in references: new = props.documents.add() new.ifc_definition_id = element.id()