Post #3606: Hi @anminmakura,
π Metadata
- Author: roaoao
- Date: 2020-10-05 10:30:16
- Type:
answer - Quality Score: 8/10
- Reply to: post_03601
- Replies (1): post_03609
π·οΈ Tags
macro pie-menu context-errors intermediate solved
βοΈ Related PME Features
- Macro Editor
- Pie Menu Editor
- Python Scripting
- Command execution
- Invoke and Undo Flag options
π¬ Content
Hi @anminmakura,
anminmakura:
I also get the following error.
RuntimeError: Operator failed, context is incorrect
This error means that some operation in your macro requires different context. Eg. Subdivide tool requires Edit mode.
I suggest to split your Arch Face tool into 2 steps:
1 step (Object Mode): Add a plane and go to Edit mode.
2 step (Edit Mode): Call Arch Face macro.
Here is Arch Face macro
To call both steps using a single button use this code in Command tab:
bpy.ops.mesh.primitive_plane_add(enter_editmode=True); open_menu("Arch Face")
anminmakura:
How do I modify the Subdivide menu so that the screen.redo_last parameter manipulation can reflect the menu registered after it?
To be able to manipulate parameters of an operation (eg. Subdivide) you need to add it to the macro with Invoke and Undo Flag options:

If you donβt want to manipulate them use Exec option instead of Invoke.
β€οΈ 3 likes