Skip to content

Instantly share code, notes, and snippets.

@SEVEZ
Created August 24, 2017 21:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SEVEZ/5a67c9f470f4a512b9816d76bf49dcdc to your computer and use it in GitHub Desktop.
Save SEVEZ/5a67c9f470f4a512b9816d76bf49dcdc to your computer and use it in GitHub Desktop.
Toggle wireframe
// Toggle wireframe
global proc NS_toggleWF()
{
string $currentPanel = `getPanel -withFocus`;
if ("" != $currentPanel && ("modelPanel" == `getPanel -to $currentPanel`))
{
string $myToggle = `modelEditor -q -displayAppearance $currentPanel`;
if ($myToggle == "smoothShaded")
{
modelEditor -e -displayAppearance "wireframe" $currentPanel;
} else {
modelEditor -e -displayAppearance "smoothShaded" $currentPanel;
}
} else {
error "No modeling panel selected or invalid.";
}
}
NS_toggleWF();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment