Refreshing the Viewports

The following methods force the viewports to redraw, or control when the viewports are redrawn.

redrawViews()

Causes the 3ds Max viewports to be immediately redrawn in an optimal way, such that only those parts of the view that have changed are redrawn. This is different from forcing a redraw with the max view redraw command or one of the following methods which redraw the entire scene in all views.

 

completeRedraw()

forceCompleteRedraw [ doDisabled:<boolean> ]

Calling this method will cause all the viewports to be completely redrawn. This method literally forces everything (every object, every screen rectangle, every view) to be marked invalid and then the whole scene is regenerated. The individual object pipeline caches are not flushed, however. This routine is guaranteed to be slow. If the optional doDisabled: boolean argument for ForceCompleteRedraw is true, disabled viewports will also be redrawn.

 

disableSceneRedraw()

Turns viewport scene redraw off (disables it). All calls to DisableSceneRedraw()/EnableSceneRedraw() must be in pairs, since an internal counter is used in 3ds Max to actually do the redraw enable/disable action.

 

enableSceneRedraw()

Turns viewport scene redraw on (enables it). All calls to DisableSceneRedraw()/EnableSceneRedraw() must be in pairs, since an internal counter is used in 3ds Max to actually do the redraw enable/disable action.

 

isSceneRedrawDisabled()

Returns true if scene redraw is disabled, false if it is enabled.

 

nodeInvalRect <node>

Invalidates the rectangle in the viewports that the node is occupying. Rectangles flagged as invalid will be updated on the next screen redraw.

See also

Redraw context