mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 21:50:01 +00:00
Fix bug where placing spaces in a spatial structure fails with non-unique names
This commit is contained in:
@@ -538,9 +538,9 @@ class IfcImporter():
|
|||||||
if element.Decomposes[0].RelatingObject.is_a('IfcProject'):
|
if element.Decomposes[0].RelatingObject.is_a('IfcProject'):
|
||||||
collection = bpy.data.collections.get(f'IfcProject/{element.Decomposes[0].RelatingObject.Name}')
|
collection = bpy.data.collections.get(f'IfcProject/{element.Decomposes[0].RelatingObject.Name}')
|
||||||
elif element.Decomposes[0].RelatingObject.is_a('IfcSpatialStructureElement'):
|
elif element.Decomposes[0].RelatingObject.is_a('IfcSpatialStructureElement'):
|
||||||
collection = bpy.data.collections.get('{}/{}'.format(
|
global_id = element.Decomposes[0].RelatingObject.GlobalId
|
||||||
element.Decomposes[0].RelatingObject.is_a(),
|
if global_id in self.spatial_structure_elements:
|
||||||
element.Decomposes[0].RelatingObject.Name))
|
collection = self.spatial_structure_elements[global_id]['blender']
|
||||||
else:
|
else:
|
||||||
collection = bpy.data.collections.get(f'IfcRelAggregates/{element.Decomposes[0].id()}')
|
collection = bpy.data.collections.get(f'IfcRelAggregates/{element.Decomposes[0].id()}')
|
||||||
if collection:
|
if collection:
|
||||||
|
|||||||
Reference in New Issue
Block a user