Skip to content

Instantly share code, notes, and snippets.

@kanishk2391
Created April 22, 2017 04:21
Show Gist options
  • Save kanishk2391/b067abf9845262e0c3083a25e0d8c91c to your computer and use it in GitHub Desktop.
Save kanishk2391/b067abf9845262e0c3083a25e0d8c91c to your computer and use it in GitHub Desktop.
Toggle Viewport Polygon display
def togglePolyDisplay():
x=cmds.modelEditor("modelPanel4", q=True, polymeshes=True)
if x == 0:
cmds.modelEditor("modelPanel4", e=True, polymeshes=True)
else:
cmds.modelEditor("modelPanel4", e=True, polymeshes=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment