mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Allow import of site objects
This commit is contained in:
@@ -393,7 +393,10 @@ class IfcImporter():
|
|||||||
self.spatial_structure_elements[structure_name]['blender'].objects.link(obj)
|
self.spatial_structure_elements[structure_name]['blender'].objects.link(obj)
|
||||||
elif hasattr(element, 'Decomposes') \
|
elif hasattr(element, 'Decomposes') \
|
||||||
and element.Decomposes:
|
and element.Decomposes:
|
||||||
collection = bpy.data.collections.get(f'IfcRelAggregates/{element.Decomposes[0].id()}')
|
if element.Decomposes[0].RelatingObject.is_a('IfcProject'):
|
||||||
|
collection = bpy.data.collections.get(f'IfcProject/{element.Decomposes[0].RelatingObject.Name}')
|
||||||
|
else:
|
||||||
|
collection = bpy.data.collections.get(f'IfcRelAggregates/{element.Decomposes[0].id()}')
|
||||||
if collection:
|
if collection:
|
||||||
collection.objects.link(obj)
|
collection.objects.link(obj)
|
||||||
elif hasattr(element, 'HasFillings') \
|
elif hasattr(element, 'HasFillings') \
|
||||||
|
|||||||
Reference in New Issue
Block a user