How to get viewport size?

Hello everyone,

I've been trying to find a way to get the viewports sizes already for a while (width/height) and no luck so far.

I've tried getRegionRect but that one doesn't change when i resize the viewport. Also, in this link https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/20... is suggested to use renderWidth & renderHeight as a way to calculate the camera's aspect ratio...

Anyway, how could i get a viewport size?

Thanks in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

getViewSize()

Returns the active view size as point2 in pixels.

BPL's picture

Awesome! thank you very much,

Awesome! thank you very much, i've been looking for this one already for quite a while ;D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.