📋 Metadata

💬 Content

MatsuikoHiroka:

is it possible to make a Model Operator for
mesh.loopcut_slide

im using a tablet and using mouse scroll is really inconvenience ( Increasing Loop cuts )

Yes, looks like it’s possible. Eg (modal operator with 4 slots):

On Invoke:

bpy.ops.mesh.loopcut_slide()

On Update:

bpy.ops.ed.undo_redo(True)

Property (Sub-hotkey):

C.active_operator.macros['MESH_OT_loopcut'].properties.number_cuts

Property (Sub-hotkey):

C.active_operator.macros['TRANSFORM_OT_edge_slide'].properties.value

Note that slot order is important. On Update slot should be above Property slots because we want to call On Update code after both sub-hotkeys.


🔗 View on Blender Artists