From 24a58cba405ddca878ff30d3a35ac0f285b5e7a1 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 28 Jan 2026 09:14:40 +1100 Subject: [PATCH] Remove functionality to unlink from non-IFC collections This is a cool idea, but users have all sorts of Blender collection strategies and I think it's a good idea for Bonsai code to just touch Bonsai's stuff and leave everything else. Separate functionality can be built for non-Bonsai workflows and preferrably in a more discoverable way than in individual Bonsai features. --- src/bonsai/bonsai/bim/module/spatial/operator.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/spatial/operator.py b/src/bonsai/bonsai/bim/module/spatial/operator.py index 18fc35c1c9..04617cc025 100644 --- a/src/bonsai/bonsai/bim/module/spatial/operator.py +++ b/src/bonsai/bonsai/bim/module/spatial/operator.py @@ -153,16 +153,10 @@ class AssignContainer(bpy.types.Operator, tool.Ifc.Operator): "Assign the selected objects to the container selected in Spatial Manager.\n\n" "All elements-parts of an aggregate will be skipped.\n" "To assign a container, they should be unassigned from an aggregate first.\n\n" - "This will also move objects to the container collection in the outliner.\n" - "ALT + Click to ensure objects are only linked in the container collection" + "This will also move objects to the container collection in the outliner." ) bl_options = {"REGISTER", "UNDO"} container: bpy.props.IntProperty(options={"SKIP_SAVE"}) - remove_from_other_containers: bpy.props.BoolProperty(default=False, options={"SKIP_SAVE"}) - - def invoke(self, context, event): - self.remove_from_other_containers = event.alt - return self.execute(context) def _execute(self, context): if self.container: @@ -193,9 +187,6 @@ class AssignContainer(bpy.types.Operator, tool.Ifc.Operator): objs.append(obj) for element_obj in objs: - if self.remove_from_other_containers: - for col in element_obj.users_collection[:]: - col.objects.unlink(element_obj) core.assign_container(tool.Ifc, tool.Collector, tool.Spatial, container=container, element_obj=element_obj) aggregates_msg = ""