Summary
Use panel() in a PME Custom item to draw an existing Blender or add-on panel inside a Popup Dialog or another supported layout.
panel(
"VIEW3D_PT_tools_meshedit_options",
frame=True,
header=True,
expand=False,
area="VIEW_3D",
)Parameters that matter most
| Parameter | Meaning |
|---|---|
pt | Panel class or class-name string, such as "VIEW3D_PT_tools_meshedit_options". |
frame | True uses a boxed frame; False uses a plain column. |
header | Shows or hides the panel header style. |
expand | True starts open, False starts closed, and None retains prior state. |
area | Supplies the expected editor type, such as "VIEW_3D" or "PROPERTIES", while the panel polls and draws. |
root | Draws directly in PME’s current layout without another wrapper. |
poll | When True, respects the panel’s own display conditions. |
layout | Draws into an explicitly supplied layout object. |
Common patterns
Draw a 3D View panel from a Popup Dialog
panel("VIEW3D_PT_tools_meshedit_options", area="VIEW_3D")Start a third-party panel collapsed
panel(
"AMTH_VIEW3D_PT_wire_toggle",
frame=True,
header=True,
expand=False,
area="VIEW_3D",
)expand=False is reliable for this route in PME2 2.0.4 and later. PME2 2.0.3 had a confirmed Pie Menu path bug where the initial expansion value was not applied.
Avoid an extra wrapper
panel("MATERIAL_PT_context_material", root=True)Choosing area
Use the editor that owns the panel. A VIEW3D_PT_* panel usually expects area="VIEW_3D"; a Properties panel may expect area="PROPERTIES".
area helps the panel’s own poll() and draw() find the editor they expect. Operators nested inside the panel can have additional region or mode requirements; use the Blender context troubleshooting guide if one still fails.