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 is 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 scaled 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.posUnscaled

A read-only variable to get the unscaled mouse position in the currently active viewport as a <point2> value. The coordinates are in pixel values, before UI scaling has been applied. If the currently active viewport is a 2D view (Track View, Schematic View, Listener, etc.), the coordinates are in the first non-2D viewport. Available in in 3ds Max 2017 and higher.

mouse.screenpos 

A read only variable to get the scaled mouse position on the screen as a <point2> value. The coordinates are in pixel values relative to the top-left corner of the screen, after UI scaling has been applied.

mouse.screenposUnscaled

A read-only variable to get the unscaled mouse position on the screen as a <point2> value. The coordinates are in pixel values relative to the top-left corner of the screen, before UI scaling has been applied. Available in in 3ds Max 2017 and higher.

mouse.inAbort 

Contains true if any mouse proc is currently in the process of aborting; otherwise contains false. Read-only.

Available in 3ds Max 2008 and higher. Previously available in Avguard Extensions.