Created
August 24, 2017 21:58
-
-
Save SEVEZ/5a67c9f470f4a512b9816d76bf49dcdc to your computer and use it in GitHub Desktop.
Toggle wireframe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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