Allow import of site objects

This commit is contained in:
Dion Moult
2020-01-11 07:51:57 +11:00
parent 6047addfae
commit 7c0f5ca7bc
@@ -393,7 +393,10 @@ class IfcImporter():
self.spatial_structure_elements[structure_name]['blender'].objects.link(obj)
elif hasattr(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:
collection.objects.link(obj)
elif hasattr(element, 'HasFillings') \