Frequently Asked Questions > Writing Better and Faster Scripts > How To Make It Faster? >

# Disable Viewport Redraws when making changes to scene objects

MAXScript FAQ > How To Make It Faster > Disable Viewport Redraws when making changes to scene objects.

When an object is being changed via MAXScript, 3ds Max will try to update the changes in the viewports as soon as possible. When the changes are many and done quickly in a loop, redraws should be disabled until all changes have been done.

You can use the with redraw off() context or a pair of disableSceneRedraw() and enableSceneRedraw() calls to speed up you code. The former method is the preferred one.

redraw Context

Refreshing the Viewports

Next Tip

Disable Undo system when possible