Notifications
Clear all

[Closed] Query Screen Resolution?

Just wondering if there is a way to query the screen size, x and y in pixels?

Thanks again,

-bnvm

4 Replies
1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

sysInfo.DesktopSize

returns a Point2 containing the size of the Windows desktop. On a dual monitor system where the desktop is set to stretch on both monitors, the result will be the total screen space including the second monitor!

getMaxWindowSize()

Returns the application size (the 3ds max window) as Point2.

gw.getWinSizeX()
gw.getWinSizeY()

These return the size of the currently active Max viewport.

great thankx.

-bnvm

My query is relevant to this thread so I thought I would try here 1st before posting a new topic.

Is there a way to set the size of a viewport?

I need to write a script which loads preset viewport layouts with scene specific cameras. I got most of it down but I can’t seem to find a way to change the size of a viewport.

Cheers

pjmowbs,

From the maxscript reference:

[left]gw.[b][b]setPos[/b][/b] <x_integer>  <y_integer> <w_integer> <h_integer>

[/left]
 [left]Sets the size and position of the graphics window. The coordinates are all Windows coordinates in the space of the graphics windows' parent window. All coordinates are in Windows format, with the origin in the upper left.

[/left]
[left]x – Specifies the left graphics window origin; y – Specifies the top graphics window origin; w – Specifies the graphics window width; h – Specifies the graphics window height.

[/left]
~M