19 May 2007

Toggle WireFrame <-> Shaded

A little script to save time. By default '4' is to display wireframe. '5' is to display Shaded mode. This script can toggle both.

I assign to '5'

//Toggle Wireframe <-> Shaded
$currentPanel = `getPanel -withFocus`;
if ( `modelEditor -q -displayAppearance $currentPanel` == "wireframe")
modelEditor -e -da smoothShaded -displayTextures off -displayLights "default" $currentPanel;
else
modelEditor -e -da wireframe $currentPanel;