What does redraw do?

Previous topic - Next topic


I'm checking out scripts and often a standard I see has to do with redraw.

The only thing I know is that it is disabled for speed.

What does this command do exactly? How does enabling vs disabling it change anything?


It literally determines whether or not the items being manipulated in the script will be drawn on the screen.

You can see this in the scripter console. Open a new document and then open scripter and run the following:


This will appear immediately.

Now run:


Nothing appears on the screen - but the console reports the name of the item - this means it has been created.

Now run:

The second frame now appears.

Basically redrawing the screen takes processing power - especially if what is being drawn is graphical such as an image. In large scripts setting redraw to false or explicitly controlling when to redraw can significantly reduce the overall time taken to execute the script the script.