mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 19:09:58 +00:00
Fix bug where libraries didn't work in IFC2X3
This commit is contained in:
@@ -60,7 +60,11 @@ class Library(blenderbim.core.tool.Library):
|
|||||||
def import_references(cls, library):
|
def import_references(cls, library):
|
||||||
props = bpy.context.scene.BIMLibraryProperties
|
props = bpy.context.scene.BIMLibraryProperties
|
||||||
props.references.clear()
|
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 = props.references.add()
|
||||||
new.ifc_definition_id = reference.id()
|
new.ifc_definition_id = reference.id()
|
||||||
new.name = reference.Name or "Unnamed"
|
new.name = reference.Name or "Unnamed"
|
||||||
|
|||||||
Reference in New Issue
Block a user