Skip to content

Commit 4427c73

Browse files
committed
bim.override_mesh_separate - handle possible mode mismatch more gracefully
Other options LOOSE_PARTS and MATERIAL do support object mode.
1 parent d188155 commit 4427c73

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/bonsai/bonsai/bim/module/geometry/operator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ def invoke(self, context, event):
9797
return self.execute(context)
9898

9999
def _execute(self, context):
100+
if self.type == "SELECTED" and context.mode != "EDIT":
101+
self.report({"ERROR"}, "Separate by selection requires EDIT mode.")
102+
return {"CANCELLED"}
103+
100104
non_ifc_objects: list[bpy.types.Object] = []
101105

102106
if len(context.selected_editable_objects) > 1:

0 commit comments

Comments
 (0)