global proc selectIsos (string $object) { string $state = "even";//"even" or "odd" string $child[] = `listRelatives -c -typ "shape" $object`; int $spansU = `getAttr ( $child[0]+".spansU")` ; int $spansV = `getAttr ( $child[0]+".spansV")` ; float $fspansU = `getAttr ( $child[0]+".spansU")` ; float $fspansV = `getAttr ( $child[0]+".spansV")` ; float $precisionU ; float $precisionV; float $b=0; int $a=0; $precisionU = (1/$fspansU); $precisionV = (1/$fspansV); select -cl; if ($state=="even") { //U for ($a=0;$a<=$spansU;$a++) { $b = $a * $precisionU; select -add ($child[0]+".u["+$b+"]") ; } //V for ($a=0;$a<=$spansV;$a++) { $b = $a * $precisionV; select -add ($child[0]+".v["+$b+"]") ; } } if ($state=="odd") { //Uodd for ($a=0;$a<=$spansU;$a++) { $b = ($a * $precisionU)+($precisionU/2) ; if ($b<1)select -add ($child[0]+".u["+$b+"]") ; } //Vodd for ($a=0;$a<=$spansV;$a++) { $b = ($a * $precisionV)+($precisionV/2) ; if ($b<1)select -add ($child[0]+".v["+$b+"]") ; } } }