PDA

View Full Version : Maya drawing override color


Brac
06-20-2009, 11:21 PM
Hi folks,

Quick questions for you all.

So I'm rigging my character, making controllers and color coding them for ease of use. All was going well until I put them into a new layer, and that layer's color overrides blew away my previous colors, ie blue for one side and red for another. So I've since removed said controllers from offending layer but I'm still getting an error about the coloroverride being locked and I'm unable to change it through the attribute editor or MEL. So what did maya/myself do that made this happen and how can I get my coloroverride back?

Any ideas and much thanks in advance. :thumbsup:

Leffler
06-21-2009, 08:12 AM
Thatīs kind of a pain, have happend to me to. I guess you have applied the color override to the transform-node and not the shape-node? Because the transform-node gets overritten by the layer, thatīs whats happening

Anyway, a workaround is to give the color to the shape-node instead. Here is a little MEL-script i wrote for doing this:


string $sel[] = `ls -sl`;
string $shNoden[];

for($x=0;$x<size($sel);$x++)
{
select -r $sel[$x];
$shNoden = `pickWalk -d down`;
setAttr($shNoden[0] + ".overrideEnabled")1;
setAttr($shNoden[0] + ".overrideColor")13;
};

select -cl;

//13 = red
//15 = blue



So select all the controllers you want to be red, run the script.
Then to get them blue, change where it says 13 to 15 in the for-loop

If I remember correct I have even got into the position where the shape-node is also locked .... if that is your case, try removing them from any layer and then go into the hypershade and break there connections to the defaultLayer and then try again ...

Hope this helps!

// Otto

Brac
06-23-2009, 02:35 AM
Thanks a bunch Otto! That totally worked! I didn't think to try changing the override color of the shape node! Brilliant! :applause:

-Ben

Leffler
06-23-2009, 03:09 AM
Nice to hear, can be a bit of a pain with those layers. In these cases MEL totally rocks ... :)

// Otto

CGTalk Moderation
06-23-2009, 03:09 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.