Saturday, January 31, 2009

Scripts - Stage10

//this script gives an example of the syntax to select a part of an object - in this case an isoparm on a nurbs surface
//defines the locaiton of the isoparm
float $isoparmloc = .3;

int $i = 1;
while ($i < 10){

//selects a random floating point number between 0 & 1 to be used when adding an isoparm
$isoparmloc = rand(1);

//defines the string to call out isoparm by name - in this case an isoparm in the u direction
//at the randomly generated number from the previous line
string $isoparm = ("nurbsPlane1.u[" + $isoparmloc + "]");

//adds an isoparm to the surface that is selected at
insertKnotSurface -ch 1 -nk 1 -add 1 -ib 0 -rpo 1 $isoparm;

//counts
$i = $i + 1;
}

No comments:

Post a Comment