Post #3009: cg

πŸ“‹ Metadata

🏷️ Tags

modal operators scripting intermediate solved

  • Modal Editor
  • Python Scripting
  • Macro Editor

πŸ’¬ Content

cgstudent:

When create modal operator for extrude and inset, the on invoke tab does not show properties like move x,y,z or flip normals just show invoke default and undo flag.

You use bpy.ops.view3d.edit_mesh_extrude_move_normal() operator which doesn’t have any properties. Try to use bpy.ops.mesh.extrude_region_move() instead.

Inset operator shows properties for me. What code do you use for it?

cgstudent:

Also when confirm or cancel the modifier do not exit form the modal and have to cancel or confirm twice to exit, how to solve it ?

Did you try to call operator without interactive mode? Eg for inset modifier:

bpy.ops.mesh.inset('EXEC_DEFAULT', True)

cgstudent:

Cold you please provide sample of a coma that cancel the modal (like when press esc)

Add a new Command slot with comma hotkey and this code:

cancel()

❀️ 2 likes


πŸ”— View on Blender Artists