From cc995db98ba7b852312478f25811b32c083f5ebe Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 29 Jan 2026 19:12:02 +1100 Subject: [PATCH] Minor fix to 46a6356 to use the collector tool This has a few advantages: - The collection logic is centralised - The collection logic is configurable based on the collection mode - The name is not hardcoded --- src/bonsai/bonsai/bim/module/spatial/prop.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/spatial/prop.py b/src/bonsai/bonsai/bim/module/spatial/prop.py index 5c48566d08..3d3d2e74f4 100644 --- a/src/bonsai/bonsai/bim/module/spatial/prop.py +++ b/src/bonsai/bonsai/bim/module/spatial/prop.py @@ -99,8 +99,7 @@ def update_name(self: "BIMContainer", context: bpy.types.Context) -> None: tool.Spatial.edit_container_name(element, self.name) if obj := tool.Ifc.get_object(element): tool.Root.set_object_name(obj, element) - if collection := tool.Blender.get_object_bim_props(obj).collection: - collection.name = f"{element.is_a()}/{element.Name or 'Unnamed'}" + tool.Collector.assign(obj) bonsai.bim.handler.refresh_ui_data()