PDA

View Full Version : connect expresion to multiple object attrb


marckury
10-04-2007, 05:47 PM
well I was testing some things but dont work , I want to put the same expresion in the scaleX of many objects , the sentence to make the expression for 1 object is similar to the one bellow(only referenceto understand), I think it has to be something about loops? well if someone can help a little with this , thanks!

int $num[]; instead of $num i need circle number 1,2,3,4,5,.....
expression -s "control_Circle_$num[].scaleX=time" -o control_Circle_$num[] -ae 1 -uc all ;

harmless
10-04-2007, 06:11 PM
from an earlier post of mine, you will get the idea:

for( $i=0;$i<3;$i++ )
{
string $objs[] = `polyCube`;
setAttr ($objs[0]+".tz") ($i*2);
addAttr -ln speed -at double $objs[0];
setAttr ($objs[0]+".speed") $i;
string $exp = ($objs[0]+".rx = (sin(time*180*"+$objs[0]+".speed)*45);");
expression -s $exp -ae true;
}

CGTalk Moderation
10-04-2007, 06:11 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.