global proc crysisCleanupObj () { string $sel[] = `ls -sl`; if ( $sel[0] == "" ) error "Please select the object you exported first (in the Outliner)!"; // Bring the object to standard Maya size and orientation. CenterPivot; move -rpr 0 0 0 $sel[0]; float $boundingBoxMin[] = `getAttr ($sel[0] + ".boundingBoxMin")`; move -a 0 0 $boundingBoxMin[2] ($sel[0] + ".scalePivot") ($sel[0] + ".rotatePivot"); move -rpr 0 0 0 $sel[0]; setAttr ($sel[0] + ".scale") .05 .05 .05; //(x20) setAttr ($sel[0] + ".rotateX") -90; // Fix UVs. select -r ($sel[0] + ".map[0:9999]"); polyEditUV -pu 0 -pv 0 -su 1 -sv -1; select -r $sel[0]; // Tweak the far clip plane. if ( `getAttr "perspShape.farClipPlane"` <= 1000 ) setAttr "perspShape.farClipPlane" 10000; }