ZombieLife
02-28-2011, 04:00 AM
Hi everybody, I'm in my first scripting class and I'm getting stumped by my current assignment. The idea is to take an existing nurbs surface and use the isoparms as extrude guidelines to create n number of smaller tubes like a cluster of wires. I'm running into a wall trying to figure out how to have the extruded wires be spread out between the first and last parm. This is only my 3rd or 4th assignment and I'm still learning the ins and outs of this voodoo. This where I'm at so far, any insight would be hugely appreciated.
global proc makeWires(int $numCurves) source "makeTUUB.mel"; //makeTUUB is something we already wrote to automate nurb extrudes
ls -sl;
string $selz[];
$selz = `ls -sl`;
print $selz;
if (`size $selz`==0)
{
warning "Nothing Selected";
}
else
{
for ($i=0,$i<=$numCurves,++$i)
{
float $numberOfParms = `getAttr $loftSurface.spansV` //This was a guess, not sure what to do with it because I need to wires to be spread evenly
float $randomRadius = rand(.1,1.5); //wire radius
float $randomOffset = rand(0.01,0.2); //for lofting the wires
string $tCurvez[];
$tCurvez = `duplicateCurve -ch 0 -rn 0 -local 0 "loftedSurface1.v[$random]"`;
makeTUUB $tCurvez $randomRadius; //other global proc, tCurvez doesn't work as an array in a string input
delete $tCurvez;
}
}
makeWires 200
global proc makeWires(int $numCurves) source "makeTUUB.mel"; //makeTUUB is something we already wrote to automate nurb extrudes
ls -sl;
string $selz[];
$selz = `ls -sl`;
print $selz;
if (`size $selz`==0)
{
warning "Nothing Selected";
}
else
{
for ($i=0,$i<=$numCurves,++$i)
{
float $numberOfParms = `getAttr $loftSurface.spansV` //This was a guess, not sure what to do with it because I need to wires to be spread evenly
float $randomRadius = rand(.1,1.5); //wire radius
float $randomOffset = rand(0.01,0.2); //for lofting the wires
string $tCurvez[];
$tCurvez = `duplicateCurve -ch 0 -rn 0 -local 0 "loftedSurface1.v[$random]"`;
makeTUUB $tCurvez $randomRadius; //other global proc, tCurvez doesn't work as an array in a string input
delete $tCurvez;
}
}
makeWires 200
