I made an operator, which have an UNDO panel with my custom properties.

If UNDO panel was collapsed – it remembers this state and next time will appear also collapsed:

enter image description here


It's not ok in my case.

I would like to either:

  1. control the panel's state dynamically (depending on the result of execute() function)

  2. or if dynamic control is not possible – to force the panel ALWAYS to stay maximized.

*(1) is preferable

How can I do either of these things?

  • 1
    $\begingroup$ Note the shortcut F9 can be used to expand the panel, it calls bpy.ops.screen.redo_last $\endgroup$
    – Gorgious
    Commented Apr 11 at 7:25

2 Answers 2


the Python API can't handle opening and closing panels


isn’t exposed via the Python API


The region of the panel is named Adjust Last Operation. The region itself can be hidden with show_region_hud.

The collapse state of the panel is defined by a flag value PNL_CLOSED which is set on different conditions but not accessible via the Python API.

  • $\begingroup$ So no way to control it via API... Pity. Anyway huge thanks for your deep research and for the the useful links. $\endgroup$
    – Yaroslav
    Commented Apr 23 at 11:37

A lot of time later I've figured a solution:

as mentioned @gorgious bpy.ops.screen.redo_last can call UNDO panel, though this panel will appear in the place where mouse pointer is located - additionally to previous (minimized) panel.

Displaying two UNDO panels at once is not optimal...

But we can show new (maximized) panel on top of the old (minimized) one, so only the new one will be visible.

To force panel's location - before calling it the mouse pointer should be set in the right place via python:

context.window.cursor_warp(x, y)

*in case of x=0 and y=0 it will be left bottom corner of the screen – and old (minimized) panel will be completely hidden by the new (maximized) one.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .