From f70ab060e3cb9a486f00d89ca2812a0dd6a9eb1c Mon Sep 17 00:00:00 2001 From: CyrilWaechter Date: Sun, 17 Apr 2022 15:10:18 +0200 Subject: [PATCH] Add default when getting space collection A case has been encountered where space object and space collection did not share the same name (eg. space.0011 and space.0021). @Moult I wonder if it is expected or if there is a consistency issue with space object/collection naming. --- src/blenderbim/blenderbim/bim/module/boundary/operator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/module/boundary/operator.py b/src/blenderbim/blenderbim/bim/module/boundary/operator.py index 2aad9c1bc2..4fd108d1fc 100644 --- a/src/blenderbim/blenderbim/bim/module/boundary/operator.py +++ b/src/blenderbim/blenderbim/bim/module/boundary/operator.py @@ -26,7 +26,7 @@ import blenderbim.bim.import_ifc as import_ifc def get_boundaries_collection(blender_space): - space_collection = bpy.data.collections.get(blender_space.name) + space_collection = bpy.data.collections.get(blender_space.name, blender_space.users_collection[0]) collection_name = f"Boundaries/{blender_space.BIMObjectProperties.ifc_definition_id}" boundaries_collection = space_collection.children.get(collection_name) if not boundaries_collection: