CODE
for ($item in $aList){
.... do something...
}
and now the examples, lets take the rebuild first as its easier. Observe the script editor history when you rebuild one surface. (do it! my values are based on my rebuild settings.) you get something like:
CODE
rebuildSurface -ch 1 -rpo 1 -rt 0 -end 1
-kr 0 -kcp 0 -kc 0 -su 4
-du 3 -sv 4 -dv 3 -tol 0.01
-fr 0 -dir 2 "nurbsSphere1";
its on one line but i enhanced readability a bit by chopping it up: you then copy paste it in the above snipet, and replace fixed names with nonfixed ones:
CODE
for ($item in ls -sl
){
rebuildSurface -ch 1 -rpo 1 -rt 0 -end 1
-kr 0 -kcp 0 -kc 0 -su 4
-du 3 -sv 4 -dv 3 -tol 0.01
-fr 0 -dir 2 $item;
}
in this case "nurbsSphere1" with $item (to represent a new value in each turn of loop) and generate the list form selection for example ls -sl
.
Thats it done
now extrude is trickier since theres 4 different flavors of extrusions you can do. Basic idea is same tough, but you can find this script in the scripts repository. But if you want me to tell you you need to tell whether you want a surface or poly exrude, linear or along curve, if curve along one curve or multiple ones?