MEL How-To #24

Back · Previous · Next Maya

How can I turn off the main modelling views automatically so Simulations calculate without being slowed by redraws?

First, you can set the layout to the "Single Persp" mode using the built-in "macro":

setNamedPanelLayout "Single Perspective View";

Next, use the 'getPanel' command to find the modelPanel for this view:

string $modelPanelA[] = `getPanel -visiblePanels`;
// Result: modelPanel4 //

Find an available outlinerPanel:

string $outlinerPanelA[] = `getPanel -type outlinerPanel`;
// Result: outlinerPanel1 //

Replace the modelPanel with the Outliner:

outlinerPanel -e -rp $modelPanelA[0] $outlinerPanelA[0];

This now gives you a workspace with no modelling views, only an Outliner.

Finally, activate the Simulation, Particle ramp-up, or whatever.