Post #1337: @roaoa:

📋 Metadata

🏷️ Tags

modal python-scripting advanced unsolved

  • Modal Editor
  • Property Editor
  • Python Scripting

💬 Content

@roaoa:
I’ve figured it out with the help of some friends, although I’m still not clear about the synthax required for some other stuff I’m attempting. Is there any more documentation coming?

I’ll also share my menus soon, although they’d need some cleaning up.

For instance: How can I get the ‘Smoothness’ control on the mousewheel to function in the following Modal:

{
“version”: “1.14.15”,
“menus”: [
[
“Subdivide / Unsubdivide”,
“Mesh”,
“alt+W”,
[
[
“On Invoke”,
“INVOKE”,
“”,
“delta = 0; bpy.ops.mesh.subdivide()”
],
[
“Smoothness”,
“PROP”,
“WHEELUPMOUSE;;;0.10000000149011612;”,
“C.active_operator.smoothness”
],
[
“Delta”,
“PROP”,
“MOUSEMOVE;-10.0;10.0;;”,
“delta”
],
[
“Subdivide / unsubdivide”,
“UPDATE”,
“”,
“bpy.ops.mesh.unsubdivide() if delta <0 else bpy.ops.mesh.subdivide(smoothness=0.0); delta = 0”
],
[
“Make Normals Consistent”,
“FINISH”,
“”,
“bpy.ops.mesh.normals_make_consistent(inside=False)”
]
],
“MODAL”,
“mo?confirm=True”,
“PRESS”,
“”,
“”
]
]
}


🔗 View on Blender Artists