Etape 14
Sélectionner toutes les feuilles et utiliser le script pour créer les locators au bon endroit.
int $spike = 2;
string $command;
string $liste[] =`ls -sl`;
int $size = size($liste);
float $place_spike[3];
for ($i=0; $i < $size; ++$i)
{
//---- save position in an array----------
$command = "$place_spike = `xform -q -ws -t " + $liste[$i] + ".pnts[" + $spike + "]`";
eval $command;
//-------------create locator------------------
createPrimitive nullObject;
$command = "move " + $place_spike[0] + " " + $place_spike[1] + " " + $place_spike[2] ; eval $command;
}
//------------select locators------------------
$i=1;
$selection = "";
while ($i < $size+1)
{
$selection = $selection + "locator" + $i+" "; $i++;
}
$command = "select -r " + $selection; eval $command;
//------------rename locators-----------------
string $selection;
string $list[] =`ls -sl`;
int $i;
for ($i=0; $i < size($list); ++$i)
{
$command = "rename " + $list[$i] + " locator_" + $i; eval $command;
}
group
rename group1 locator_group;