Eight forum conversations show how a shortcut can grow into a small workflow tool. Motiomancer is the recurring responder, connecting menu composition, temporary state, reusable controls, input, execution, and Blender context.
Read in order, or jump to the problem closest to yours:
- Compose an interface from smaller parts
- Borrow a tool only while a key is held
- Save state before changing it
- Turn a property into a reusable control
- Give one item several modifier-key branches
- Remember the last useful choice
- Choose interaction or immediate execution deliberately
- Treat Blender context as part of the command
1. Compose an interface from smaller parts
A long flat Popup Dialog hid which controls belonged together. The answer was to let small child dialogs hold related controls, then place them in a container with draw_menu("Section Name", frame=True). A child can then appear in more than one place without copying its contents. See Group framed sections inside a Popup Dialog for the PME 2.1 steps.
Forum trail. The request for bounded groups → the child-dialog proposal → the framing requirement clarified → the framed construction → the confirmed result.
2. Borrow a tool only while a key is held
A sculpting workflow needed a mask brush only while a key was held, followed by the previous brush. A Sticky Key can save a value on press and restore it on release. List every setting the temporary tool changes—brush, strength, mask mode, and anything else—so release restores the whole interaction. The brush names and API paths in the 2021 posts are old; Hold a key to temporarily switch Sculpt brushes shows how to rebuild the idea.
Forum trail. The hold-to-mask request → Sticky Key and keymap direction → follow-up on the interaction → the working construction → requester confirmation → the remaining cursor-detection question.
3. Save state before changing it
A command temporarily changed transform orientation, pivot, and the active tool. The useful lesson is to decide what must be restored before making the first change. Values needed only within one Macro can use the Macro’s shared variables; values needed by a later invocation can use U, which lasts until Blender or PME restarts. Share temporary state between Macro steps covers the shorter case. The property paths in the 2021 posts need to be recaptured before use.
Forum trail. The multi-setting restore request → the session-state pattern → the completed workflow.
4. Turn a property into a reusable control
A vertex-group control needed to work in a Popup Dialog and a Macro. Putting its getter, setter, and type in one Property Editor item made that control reusable; menus could decide where to show it without repeating the state logic. Start with Build a Property Editor slider, and use the PME props() accessor when a script needs the registered value. The attached 2021 JSON and active-object path are historical examples.
Forum trail. The reusable vertex-group control request → the Property Editor direction → the first implementation question → setter refinement → Popup Dialog composition → the revised setup → the confirmed result.
5. Give one item several modifier-key branches
Several related actions can share one item, with Alt, Ctrl, or Shift selecting the variation. In event-backed PME execution, E is the current Blender event supplied when the Command runs; check its modifier values in a deliberate order so combinations such as Ctrl+Shift have a predictable result. If the expression becomes hard to scan, move it into a named script. See Use modifier keys in one PME item.
Forum trail. The one-item modifier question → the event-branch answer.
6. Remember the last useful choice
A hold-and-drag menu selected a command, while a later tap was expected to repeat it. A Stack Key with Remember Slot and Advance On: Quick Repeat now provides that behavior directly: an isolated press repeats the saved slot, and a rapid second press advances. Memory starts fresh after Blender restarts. See How Remember Slot and Quick Repeat work.
The 2022 answer achieved this by storing command text in U.mem and passing it to exec(). That workaround belongs to the history of the idea; the Stack Key option replaces it.
Forum trail. The choose-on-drag, repeat-on-tap request → the historical remembered-command workaround → the confirmed interaction.
7. Choose interaction or immediate execution deliberately
A snap-and-pivot Macro partly failed because one step opened an interactive operation when the workflow expected an immediate result. Use INVOKE_DEFAULT for an operator that needs mouse input, an event, a dialog, or modal setup. Use EXEC_DEFAULT when all values are already known and the operator supports immediate execution. That change fixed this specific Macro; it is not a rule that every Macro step should use EXEC_DEFAULT. Choose EXEC or INVOKE deliberately gives the test.
Forum trail. The failing snap-and-pivot Macro → the first diagnosis → the execution details → the revised test → partial success with immediate execution → the invocation explanation and limits.
8. Treat Blender context as part of the command
A Sticky Key launched from a UV workflow needed to change a 3D View overlay. Blender commands depend on the editor, region, mode, selection, and active object as well as the operator name. Start with Diagnose the Blender context first. If the workflow genuinely crosses editors, use PME 2.1’s focus_area() or an override_context() scope that is always exited. If the goal is only to choose a different PME menu, route to a context-specific menu instead.
The 2022 answer used the older bpy.ops.pme.exec(override_context(...), cmd=...) form. It explains why the context mattered; PME 2.1 uses the helpers described above.
Forum trail. The cross-editor overlay request → the historical override route → the missing-name failure → the corrected placement → the confirmed Sticky Key result.
The path through the eight ideas
compose UI → save temporary state → expose controls → read input
→ remember a choice → choose execution → satisfy contextThe first four ideas build the tool. The next two make it respond to how the shortcut is used. The last two explain why an otherwise valid action can still fail in Blender. Start at the part that matches your problem; the forum links are there when you want the full conversation.