Resize GUI window size from render script

Let’s say I want to implement black bar banding. The first step would be to change the GL viewport with render.set_viewport(), but then a few problems emerge:

  1. Any input done with gui.pick_node() doesn’t line up anymore.
  2. The GUI scenes don’t resize and respect layouts properly because they still think their size is the size of the screen.

It would be really cool to be able to tell the GUI “you render within this viewport instead of full screen, please adjust your coordinate system accordingly”. Otherwise, I’d have to handle moving things out of the way of the bands from each GUI script individually.

Or is what I’m trying to do already possible? If so, then how?

2 Likes

I agree, it would be nice to have manual control over the area the GUI is adjusted to. I had a short thread about my fight with the same issue. If you will always use the same viewport proportion then you can just build your GUIs to fit that area and keep them anchored to the center (X and Y anchors = “None”), but if you want to change the proportion you will have to move things manually.

2 Likes