Set viewer size with openViewer()

is there a way to specify the size of the viewer?
I am using a lot this line of code connected to a Keyboard IN DAT

ui.panes.current.owner.currentChild.openViewer()

and would love to open the viewer always at a certain size (and ideally always in the same position on my monitor)

According to the wiki documentation OP Class - Derivative I can only set ‘unique’ and ‘borders’ openViewer(unique=False, borders=True)

Any tips?

1 Like

I’d change your approach slightly - rather than just opening the viewer of a given operator, I’d find the operator, and then use it with a window COMP. A window COMP has a handful of other handles for window placement, size, borders, etc. that will ultimately give you more flexibility.

4 Likes

thanks Matt, will look into that. The Window COMP seems a bit over the top but will give it a go.
I was hoping that the openViewer Class had some hidden gems in there to help me out!

Alas, I can confirm that Matthew is correct… you need to set up a windowCOMP to have control over window settings.

2 Likes