//--------------------------------------------------------------------------------- //reflatten and relocate toggle //--------------------------------------------------------------------------------- //reflatten //select all the objects for($i=0;$i < (($gx - 1) * ($gy - 1) ); $i++){ select -add ("HiroPoly" + $i); } string $slPolySrf[] = `ls -sl`; int $pCount = 0; for($each in $slPolySrf){ select -r $each; rotate -r 0 $xRot[$pCount] 0 ; rotate -r $yRot[$pCount] 0 0; $pCount++; currentTime $i; } //relocate; for( $i = 0; $i < size ($slPolySrf); $i++){ select -r ("HiroPoly" + $i); float $curAngle[] = `xform -q -ro ("HiroPoly" + $i)`; rotate -a 0 0 0; move -a 0 0 0; currentTime $i; }