Post #1572:
Ma
π Metadata
- Author: roaoao
- Date: 2018-09-30 15:13:52
- Type:
answer - Quality Score: 8/10
- Reply to: post_01570
- Replies (1): post_01573
π·οΈ Tags
βοΈ Related PME Features
- Macro Editor
- Modal Editor
- Property Editor
- Hotkey Configuration
π¬ Content
MatsuikoHiroka:
is it possible to make a Model Operator for
mesh.loopcut_slideim 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.