From 593833e7c5fe6d9c5769585ac0d49663be1a5fcf Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Sun, 16 Nov 2025 14:37:59 -0600 Subject: [PATCH] have it only work on 1 object, at a time. --- src/bonsai/bonsai/bim/module/geometry/operator.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bonsai/bonsai/bim/module/geometry/operator.py b/src/bonsai/bonsai/bim/module/geometry/operator.py index e5661a4188..1b1fc595e7 100644 --- a/src/bonsai/bonsai/bim/module/geometry/operator.py +++ b/src/bonsai/bonsai/bim/module/geometry/operator.py @@ -2575,6 +2575,16 @@ class DirectProfileEdit(bpy.types.Operator, tool.Ifc.Operator): return True def _execute(self, context): + # Ensure we're only working with the active object + # Deselect all other objects if multiple are selected + active_obj = context.active_object + if active_obj and context.mode == "OBJECT": + if len(context.selected_objects) > 1: + self.report({"WARNING"}, "Currently Direct Profile Edit only works on one object at a time. Operating on active object only.") + bpy.ops.object.select_all(action='DESELECT') + active_obj.select_set(True) + context.view_layer.objects.active = active_obj + # If we're already in edit mode, exit to object mode and SAVE changes if context.mode in ("EDIT_MESH", "EDIT_CURVE"): return self.handle_exit_edit_mode(context)