Fix bug where libraries didn't work in IFC2X3

This commit is contained in:
Dion Moult
2021-12-09 17:51:29 +11:00
parent f716f8a357
commit 7c633fab31
+5 -1
View File
@@ -60,7 +60,11 @@ class Library(blenderbim.core.tool.Library):
def import_references(cls, library):
props = bpy.context.scene.BIMLibraryProperties
props.references.clear()
for reference in library.HasLibraryReferences:
if tool.Ifc.get_schema() == "IFC2X3":
references = library.LibraryReference
else:
references = library.HasLibraryReferences
for reference in references:
new = props.references.add()
new.ifc_definition_id = reference.id()
new.name = reference.Name or "Unnamed"