Created
July 21, 2016 20:36
-
-
Save AndrewtConroy/666b9d8219ac5851465b6145104463a0 to your computer and use it in GitHub Desktop.
toggle display type
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
import maya.cmds as cmds | |
selected = cmds.ls(sl=1) | |
for item in selected: | |
override = cmds.getAttr(item + '.overrideEnabled') | |
display = cmds.getAttr(item + '.overrideDisplayType') | |
if override == 0 : | |
cmds.setAttr(item + '.overrideEnabled', 1) | |
cmds.setAttr(item + '.overrideDisplayType', 2) | |
else: | |
if display != 2: | |
cmds.setAttr(item + '.overrideDisplayType', 2) | |
if display == 2: | |
cmds.setAttr(item + '.overrideDisplayType', 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment