Size of the resolution gate in maya

Hello,
I was wondering if there was a way of getting the size of the resolution gate of the active viewport ?
I can get the size of the viewport but I could not find anything on the resolution gate.

Thank you :slight_smile:

I don’t know if this is the only place to set or query it. To me “default” implies other places to get this info. But it is based on render settings, not on your camera. Perhaps there are camera-specific versions of this too, but I don’t know that.

# get
cmds.getAttr('defaultResolution.width')
cmds.getAttr('defaultResolution.height')

# set
cmds.setAttr('defaultResolution.width', 1920)
cmds.setAttr('defaultResolution.height', 1080)

Hello,
the code you wrote will get me the resolution in my render settings.
What I need is the resolution gate. The square in my picture. It is relative to the viewport.
I can get the size of the viewport but I can’t find the size of the resolution gate.