Managing multiple drawing overrides

423 views
Skip to first unread message

Steve Davy

unread,
Jan 7, 2011, 6:49:07 PM1/7/11
to Maya Group
Finding myself setting a lot of drawing overrides on multiple objects these days, specifically because I want to make them all have a custom color for ease of seeing groups of objects that relate to each other when animating (e.g. characters, motion path control clusters, controller objects etc.).

It's easy enough to turn on Enable Overrides with a simple for-in loop, but I'm a bit flummoxed as to what is going on when setting the Color Index. This doesn't seem to be a simple integer lookup like a lot of Maya's other similar widgets. I'd really like a simple way to just select a group of objects and set their override color index to the same value. Was hoping there might be a script to manage this on Creative Crash but don't see anything...

Anyone got any pointers about how best to deal with this?

Sagroth

unread,
Jan 7, 2011, 6:57:24 PM1/7/11
to maya_he3d
Should work like this - it really is a simple integer:

setAttr( shp + '.overrideEnabled', 1 )
setAttr( shp + '.overrideColor', 17 )

Steve Davy

unread,
Jan 7, 2011, 7:34:57 PM1/7/11
to Maya Group
Hm, really? I didn't try that as when I turned on Echo All Commands I didn't see a simple value being set.

Cool if it's that simple though! Thanks.

> Date: Fri, 7 Jan 2011 15:57:24 -0800
> Subject: [maya_he3d] Re: Managing multiple drawing overrides
> From: sag...@gmail.com
> To: maya...@googlegroups.com

Maido Hollo

unread,
Sep 22, 2017, 3:43:28 AM9/22/17
to maya_he3d
What is "for-in" loop and how would I use this "setAttr( shp + '.overrideEnabled', 1 ) " line of script for multiple selected objects?

Basically I want to make all my mesh objects unselectable (set display override to reference)

Changing parameters for multiple objects in Maya is strangely complicated...why these parameters are not presented in Attribute Spreadsheet for example?

Tnx
Reply all
Reply to author
Forward
0 new messages