Hi all,
I'm wondering if anyone knows of a script to change the selected object's Display Color Channel from Ambient+Diffuse to None. I can't find anything on google. Any help would be greatly appreciated!
# Toggle between Ambient+Diffuse and None display modes.import maya.cmds as cmdsselectedShapes = cmds.ls(transforms=True, selection = True)def SetDisplay(curShape ,curMode): if curMode == "Ambient+Diffuse": cmds.setAttr(curShape + '.displayColorChannel', 'None', type = 'string') else: cmds.setAttr(curShape + '.displayColorChannel', 'Ambient+Diffuse', type = 'string')for shape in selectedShapes: curMode = cmds.getAttr(shape + '.displayColorChannel', asString = True) SetDisplay(shape,curMode)
Replies