Mouse Cursors

The following methods control the mouse cursor.

setWaitCursor()

setArrowCursor()

These functions can be used to display the system wait cursor during some prolonged computation and then replace it with the normal cursor. You might want to do this instead of putting up a 3ds max progress bar, which may be too heavy-weight in some situations. Note that in some cases, 3ds max may itself restore the arrow cursor underneath this one (for example, with loadMAXFile()), and you may need to redisplay it after such calls.

setSysCur <name>

Sets the current system cursor to one of the standard 3ds max cursors. Valid <name> values are:

#move

#rotate

#uscale

#nuscale

#squash

#select

#arrow

Note: setSysCur #squash shows the non-uniform scale cursor.

The following 3ds max system global variables are associated with the mouse:

mouse.mode

A read only variable to get the mouse mode as an <integer> value. Return values are: 0 - Idle; 1 - Point; 2 - Move

mouse.buttonStates

A read only variable to get the state of the mouse buttons as a 3 element <bitArray>. The order of the bits is: #{Left, Middle, Right}

Note: right mouse button state not always correct. If you right click to bring up a right-click menu and then click in the viewport to dismiss the menu, the right mouse button is still reported as down.

mouse.pos

A read only variable to get the mouse position in the currently active viewport as a <point2> value. The coordinates are in pixel values. If the currently active viewport is a 2D view (Track View, Schematic View, Listener, etc.), the coordinates are in the first non-2D viewport.

mouse.screenpos

A read only variable to get the mouse position on the screen as a <point2> value. The coordinates are in pixel values relative to the top-left corner of the screen.