This script writes one OBJ for all selected polygons for each of 24 frames.
///////////////////////// //select all geometry, which happened to be //named Poly_* (Poly1 - Poly15 in this example) for ($i =1; $i <= 15 ; $i++){ select -tgl ("poly_" + $i); } // export to obj for( $index = 0; $index <= 24; $index++ ) { currentTime $index; file -op "groups=0;ptgroups=0;materials=0;smoothing=0;normals=0" -typ "OBJexport" -pr -es ("PATH_TO_TARGET_DIR/objExported." + $index); } /////////////////////
This code scales a character’s top node, called “whole” here, before exporting the geometry, then rescales it. The result are objs scaled as specified.
///////////////////////// //scale Character setAttr "whole.scaleX" 3; setAttr "whole.scaleY" 3; setAttr "whole.scaleZ" 3; //select all geometry, which happened to be //named Poly_* (Poly1 - Poly15 in this example) for ($i =1; $i <= 15 ; $i++){ select -tgl ("poly_" + $i); } // export to obj for( $index = 0; $index <= 24; $index++ ) { currentTime $index; file -op "groups=0;ptgroups=0;materials=0;smoothing=0;normals=0" -typ "OBJexport" -pr -es ("PATH_TO_TARGET_DIR/objExported." + $index); } //rescale setAttr "whole.scaleX" 1; setAttr "whole.scaleY" 1; setAttr "whole.scaleZ" 1; /////////////////////