mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 12:09:51 +00:00
Minor fix
This commit is contained in:
@@ -81,11 +81,15 @@ class IfcStore:
|
|||||||
objects += [bpy.context.active_object]
|
objects += [bpy.context.active_object]
|
||||||
else:
|
else:
|
||||||
objects = bpy.data.objects
|
objects = bpy.data.objects
|
||||||
[
|
|
||||||
IfcStore.link_element(file.by_id(obj.BIMObjectProperties.ifc_definition_id), obj)
|
for obj in objects:
|
||||||
for obj in objects
|
if not obj.BIMObjectProperties.ifc_definition_id:
|
||||||
if obj.BIMObjectProperties.ifc_definition_id
|
continue
|
||||||
]
|
element = file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||||
|
data = {"id": element.id(), "obj": obj.name}
|
||||||
|
if hasattr(element, "GlobalId"):
|
||||||
|
data["guid"] = element.GlobalId
|
||||||
|
IfcStore.commit_link_element(data)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def link_element(element, obj):
|
def link_element(element, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user