bim.override_mesh_separate - invoke menu if called without argument

Mimicking default mesh.separate behaviour.

@Gorgious56 I don't know if you've seen this before, but you might be interested - I've found a way to figure if operator wasn't called without any arguments.
This commit is contained in:
Andrej730
2025-04-22 17:11:39 +05:00
parent 0a6fbeccb0
commit 671c887201
@@ -80,6 +80,11 @@ class OverrideMeshSeparate(bpy.types.Operator, tool.Ifc.Operator):
items=[(i.identifier, i.name, i.description) for i in blender_type_prop.enum_items],
)
def invoke(self, context, event):
if "type" not in self.properties:
return bpy.ops.wm.call_menu(name="BIM_MT_hotkey_separate")
return self.execute(context)
def _execute(self, context):
obj = context.active_object
assert obj