PDA

View Full Version : setAttr to a variable


MikeRhone
12-17-2003, 07:07 PM
ack... 2 simple mel questions in a single day...

I cant find any examplesto help me out in the forums or in the mighty F1. My simple question:

I need to change the overrideVisibily of an object as such:

string $sampler = "rightHandMesh";
setAttr ($sampler + ".overrideVisibility" = 0);

But this method doesnt work. Is this a case where setAttr is not used? Or is my syntax just off by a hair and I cant see it?

Also, is there a MEL command to edit the wireframe color of an object in the color overrides? It doesnt output anything useful in the script editor, and I cant see anything in the reference guide.




Mike R

dwalden74
12-17-2003, 07:21 PM
Or is my syntax just off by a hair and I cant see it?

yep. Try this:
setAttr ($sampler + ".overrideVisibility") 0;

is there a MEL command to edit the wireframe color of an object in the color overrides?

yep. First you activate display overrides, like this:
setAttr ($sampler + ".overrideEnabled") 1;

then you set the color value to whatever you like, like this:
setAttr ($sampler + ".overrideColor") 6;



:beer:

CGTalk Moderation
01-16-2006, 11:00 PM
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.