mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
Fix bug where spatial objects with representations didn't import correctly.
This commit is contained in:
@@ -1266,7 +1266,15 @@ class IfcImporter:
|
||||
if element.is_a("IfcProject"):
|
||||
return
|
||||
elif element.GlobalId in self.spatial_structure_elements:
|
||||
return
|
||||
if not obj.data:
|
||||
return
|
||||
# Since spatial structure elements are generated as empties, we'll replace it with the representation
|
||||
spatial_obj = self.spatial_structure_elements[element.GlobalId]["blender_obj"]
|
||||
spatial_collection = self.spatial_structure_elements[element.GlobalId]["blender"]
|
||||
spatial_name = spatial_obj.name
|
||||
spatial_collection.objects.link(obj)
|
||||
bpy.data.objects.remove(spatial_obj)
|
||||
obj.name = spatial_name
|
||||
elif (
|
||||
hasattr(element, "ContainedInStructure")
|
||||
and element.ContainedInStructure
|
||||
|
||||
Reference in New Issue
Block a user