bontempos

12-05-2007, 01:08 PM

Hello!

I`m trying to place 10 (any number) locators stuck into a nurbs curve,

and so far i`ve got this code:

string $curve[] = `ls -sl`;

float $i;

for ($i = 1; $i < 11; $i++) {

spaceLocator -p 0 0 0;

select -tgl $curve;

pathAnimation -fractionMode true -follow true -followAxis x -upAxis y -worldUpType "vector" -worldUpVector 0 1 0 -inverseUp false -inverseFront false -bank false -startTimeU 1;

setAttr ("motionPath"+$i+".uValue") $i/10;

};

The result is ok. But i`m interested in learning Mel, and I`d like to know how to simplify this things...

I`ll prompt a Window where the user can set the number (10 in this case) and a button to evaluate the code.

Thanks a lot,

Anderson

I`m trying to place 10 (any number) locators stuck into a nurbs curve,

and so far i`ve got this code:

string $curve[] = `ls -sl`;

float $i;

for ($i = 1; $i < 11; $i++) {

spaceLocator -p 0 0 0;

select -tgl $curve;

pathAnimation -fractionMode true -follow true -followAxis x -upAxis y -worldUpType "vector" -worldUpVector 0 1 0 -inverseUp false -inverseFront false -bank false -startTimeU 1;

setAttr ("motionPath"+$i+".uValue") $i/10;

};

The result is ok. But i`m interested in learning Mel, and I`d like to know how to simplify this things...

I`ll prompt a Window where the user can set the number (10 in this case) and a button to evaluate the code.

Thanks a lot,

Anderson