PDA

View Full Version : Fun with Override Colors


backwheelbates
12-11-2012, 07:31 AM
I had looked around for an artist friendly color description list for years. I finally just put one together myself for Maya's display override colors. Hope someone can find this useful!

http://en.wikipedia.org/wiki/List_of_colors

colorList = [\
'None=0',\
'Black=1',\
'Silver=2',\
'Grey=3',\
'VenetianRed=4',\
'Navy=5',\
'Blue=6',\
'BritishRacingGreen=7',\
'Indigo=8',\
'DeepMagenta=9',\
'PiperOrange=10',\
'TemptressBrown=11',\
'TawnyOrange=12',\
'Red=13',\
'Green=14',\
'Cobalt=15',\
'White=16',\
'Yellow=17',\
'Aqua=18',\
'BrightTurquoise=19',\
'MelonRed=20',\
'ManhattanOrange=21',\
'LaserLemon=22',\
'Jade=23',\
'IndochineOrange=24',\
'LemonGinger=25',\
'SushiGreen=26',\
'Eucalyptus=27',\
'ScooterBlue=28',\
'LochmaraBlue=29',\
'PurpleHeart=30',\
'LipstickRed=31']

And if you'd like to add this as an enum list in the channel box:


cmds.addAttr('yourObjectName', ln='overrideColor', at='enum', enumName=(':'.join(colorList)))
cmds.setAttr(('yourObjectName' + '.overrideColor'), overrideColor, e=True, keyable=False, cb=True)

Cheers!

Eric
http://www.eric-bates.com/eblabs/

CGTalk Moderation
12-11-2012, 07:31 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.