Outcome
Turn a pie slot into the familiar menu bar from the Blender editor where the pie was opened:
header_menu("CURRENT")PME 2.1 provides header_menu() as a built-in Custom-layout helper. The external ZIP used by the original 2016 technique is no longer needed.
Steps
-
Open a Pie Menu in PME and add or edit an item.
-
Set the item to Custom.
-
Enter:
header_menu("CURRENT") -
Apply the item, then invoke the pie from a 3D View, Node Editor, or another editor with a standard Blender header menu.
-
Open one of the displayed menu names just as you would from that editor’s header.
CURRENT is resolved when PME draws the pie, so the same item can follow the editor in which it is used.
To request one specific editor instead, pass its Blender area type:
header_menu("VIEW_3D")You can also draw more than one editor’s menu strip in the same Custom item:
header_menu(["VIEW_3D", "NODE_EDITOR"])Pitfalls
- Use a Custom item.
header_menu()draws into PME’s layout object, so it belongs in a Custom item. - An explicit area type does not change Blender’s active editor. It only asks PME to draw that editor’s registered header menus.
- Not every Blender area exposes a compatible
*_MT_editor_menusclass. If an area produces nothing, tryCURRENTfrom that editor first. - A full header menu can contain many entries. One editor per pie item is usually easier to scan than several long strips in one slot.
- If a third-party add-on changes a native header menu, its entries may also appear here because PME calls Blender’s registered menu class.
- The
custom_header_menu.zipattached to the 2016 post documents the idea’s origin. PME 2.1 already includes the helper it provided.
The original post targeted Blender 2.77. Its screenshot still illustrates the result, but PME 2.1 provides header_menu() directly, so the old external-script installation is unnecessary.
Related
- Add a complex Blender widget to a PME Popup Dialog
- Build a stable Panel Group toolbar
- Run an external Python script from PME