Miscellaneous Viewport Methods and System Globals

createPreview()      

Creates a viewport preview using the current values in the Make Preview dialog.

A number of optional keyword arguments have been added to control the createPreview settings indendently from the Make Preview dialog settings. Available in 3ds Max 2013 and higher.

getVPortBGColor()      
setVPortBGColor()   

Get and set the viewport background color as a Color value.

isCPEdgeOnInView() 

This method returns true if the construction plane is 'head on' in the current viewport. For example if the construction plane was XY and you were looking from the Front view, this method would return true . This is used for example during object creation because this process doesn't work very well when the view is 'head on'.

axisTripodLocked() 

This method returns true if the axis tripods are locked, that is, they won’t move when you move an object or sub-object, false otherwise.

lockAxisTripods <boolean> 

If <boolean> is true , this method locks the axis tripods so that they will not be updated. If false , the axis tripods will be updated.

Note: In certain cases, the lockAxisTripods() method can cause multiple Assertion Failures. This occurs when one or more objects are selected, lockAxisTripods true is executed, and then the objects are deselected.
flashNodes <node_array> 

This method is used to 'flash' a group of nodes. This is usually used as a confirmation of some operation (for example as an indication of the completion of a pick node operation.) The nodes are briefly erased and then redrawn in the viewport to flash them.

Note: The flashNodes() method does not redraw the viewports after displaying the specified nodes as white wireframes. To properly redraw the viewports, call the forceCompleteredraw() method immediately after calling flashNodes() .

The following 3ds Max system global variables are applicable to the viewports:

displaySafeFrames 

Lets you get and set whether Show Safe Frames is on for the active viewport. A Boolean value - true if Show Safe Frames is on, false if off.

preferences.useLargeVertexDots 

Lets you get and set whether to use small or large dots when representing vertices as dots. A Boolean value set to true if you when using dots to represent vertices and a large size is desired. The value of this variable only has effect when UseVertexDots is set to true .This variable contains the corresponding value set in the Viewports page of Customize > Preferences.

preferences.useTransformGizmos 

Lets you get and set whether to use the Transform Gizmos. A Boolean value - true if on, false if off. This variable contains the corresponding value set in the Viewports page of Customize > Preferences.

preferences.useVertexDots 

Lets you get and set whether to represent vertices as dots. A Boolean value set to true when you want to use dots as the representation of the vertices in a mesh. If set to false , ticks will be used.This variable contains the corresponding value set in the Viewports page of Customize > Preferences.