bim.override_mesh_separate - handle possible mode mismatch more gracefully

Other options LOOSE_PARTS and MATERIAL do support object mode.
This commit is contained in:
Andrej730
2025-04-22 18:44:05 +05:00
parent d188155fac
commit 4427c73816
@@ -97,6 +97,10 @@ class OverrideMeshSeparate(bpy.types.Operator, tool.Ifc.Operator):
return self.execute(context)
def _execute(self, context):
if self.type == "SELECTED" and context.mode != "EDIT":
self.report({"ERROR"}, "Separate by selection requires EDIT mode.")
return {"CANCELLED"}
non_ifc_objects: list[bpy.types.Object] = []
if len(context.selected_editable_objects) > 1: