// // This script sets up a basic "procedure" a command that can be called by name within a greater script. // // First we must DEFINE the procedures name and variables (parameters)... global proc make_planes (int $max, float $size, int $up) { // clear the scene of any extra items.... select -all; delete; // set up a repeating loop to create multiple objects.... for($counter=0; $counter<$max; $counter++) { // then we create a nurbsplane and rename them all "BOB#" nurbsPlane -p ($size/2) ($size/2) 0 -ax 0 0 1 -w $size -lr 1 -d 3 -u 5 -v 5 -ch 1 -n ("bob" + $counter) ; // then the plane is moved up relative to its "creation number": move -r 0 0 ($counter * $up) ; }; }; // Once the procedure is created AND EXECUTED ONCE IN MEL you can run it simply by // typing its name followed by values for all the parameters. // // Example: make_planes 4 140 20; // // Here we get 4 planes, and they are seperated by 20 units each.....