|
Ive figured out how to do what I initially had posted but now I’m running into array selection issues. Basically I will have 3 dimensions of squiggles which are placed in 3 separate mel files so when ran you get a grid.
My issue is how to select just the curves being created where the loops will not interfere with the new set of curves when later duplicated. A string such as string $selectZ[] = `ls -dag -lf -ap -o`; works fine for one selection then obviously the next set reads and duplicates all the dag objects in the scene.
Here’s a snippet of the top part of the script.
BTW the 3 scripts will make squiggly lines on the x y and z axis forming a grid and has settings for spacing as well. The selection of the beginning part of the script needs to select all the curves created then I will be able to implement this with the rest of the code so the selection is based just on the current selection, not all the dag objects in the scene.
Still learning arrays so any suggestions will be helpful.
global proc js_squigglyGridZ (int $cvCountZ, int $curveCountZ)
{
int $j;
int $i;
//string $myCurvesX[];
for($j = 0; $j < $curveCountZ; $j++)
{
string $curveZ = "curve ";
for ($i = 0; $i < $cvCountZ; $i++)
{
$curveZ = $curveZ + "-point " + $i + " " + rand(-.2, 1) + " " + rand(-.4, .5) + " ";
}
evalEcho($curveZ)
rotate -r -os 0 -90 0 ; //string $selectZ =size ($curveZ)
//select $selectZ;
}
}
|