For those of you starting out, here’s a simple array script to create instances of a primitive. You should be able to build onto this script very easily. Play with the numbers, and see how far you can push it. Soon, I’ll modify it so it arrays your selection. I’m working on a ring mail script, and this is a fundamental part of making ring mail.
mls_f3DArray(3, 1.0); proc mls_f3DArray(int $objCount, float $oSp) { int $n = 0; string $cube[] = `polyCube -ax 0 1 0`; BevelPolygon; //1D, X for($i = 0; $i < $objCount; $i++) { //2D, Y for($j = 0; $j < $objCount; $j++) { //3D, Z for($k = 0; $k < $objCount; $k++) { string $inst[] = `instance $cube[0]`; vector $v = << ($oSp * $i), ($oSp * $j), ($oSp * $k) >>; xform -ws -t ($v.x) ($v.y) ($v.z) $inst[0]; $n++; } } } delete $cube; }
Subscribers
396
Leave a Reply
You must be logged in to post a comment.