From a7c14bc7c3f49c1beeedd8e1fdf0c02061192426 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 8 Mar 2020 14:51:32 +1100 Subject: [PATCH] Fix bug where placing spaces in a spatial structure fails with non-unique names --- src/ifcblenderexport/blenderbim/import_ifc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/import_ifc.py b/src/ifcblenderexport/blenderbim/import_ifc.py index f71d9a4ce1..2a9b52a251 100644 --- a/src/ifcblenderexport/blenderbim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/import_ifc.py @@ -538,9 +538,9 @@ class IfcImporter(): if element.Decomposes[0].RelatingObject.is_a('IfcProject'): collection = bpy.data.collections.get(f'IfcProject/{element.Decomposes[0].RelatingObject.Name}') elif element.Decomposes[0].RelatingObject.is_a('IfcSpatialStructureElement'): - collection = bpy.data.collections.get('{}/{}'.format( - element.Decomposes[0].RelatingObject.is_a(), - element.Decomposes[0].RelatingObject.Name)) + global_id = element.Decomposes[0].RelatingObject.GlobalId + if global_id in self.spatial_structure_elements: + collection = self.spatial_structure_elements[global_id]['blender'] else: collection = bpy.data.collections.get(f'IfcRelAggregates/{element.Decomposes[0].id()}') if collection: