RavenEye
05-23-2007, 10:37 PM
Can someone assist me with this little loop. I'm still having a difficult time creating loops, so I have no idea where to begin with the syntax error it gave me. Basically I make an easy to do but long to do alot easier and faster.
string $sel[] = `ls -sl`;
for ($cur to $sel)
{
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallR|eyeBallR1.visibility;
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallL|eyeBallL1.visibility;
setAttr ("$cur" + ".body") 0;
setAttr "eyeBallL|eyeBallL1.visibility" 0;
setAttr "eyeBallR|eyeBallR1.visibility" 0;
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallR|eyeBallR1.visibility;
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallL|eyeBallL1.visibility;
}
// Error: for ($cur to $sel) //
// Error: Syntax error //
// Error: }; //
// Error: Syntax error //
string $sel[] = `ls -sl`;
for ($cur to $sel)
{
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallR|eyeBallR1.visibility;
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallL|eyeBallL1.visibility;
setAttr ("$cur" + ".body") 0;
setAttr "eyeBallL|eyeBallL1.visibility" 0;
setAttr "eyeBallR|eyeBallR1.visibility" 0;
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallR|eyeBallR1.visibility;
setDrivenKeyframe -cd ("$cur" + ".body") eyeBallL|eyeBallL1.visibility;
}
// Error: for ($cur to $sel) //
// Error: Syntax error //
// Error: }; //
// Error: Syntax error //
