global proc string meSaveSeq (){ string $sel[] = `ls -sl`; if (size($sel) == 0) return "select objects to be exported!"; // loop through the current playback range and export a scene file per-frame string $fullScene = `file -q -sceneName`; string $scene = basename($fullScene,".mb"); $scene = basename($fullScene,".ma"); string $path = dirname($fullScene); // make a subdir if doesn't exist string $subdir = "/sequence/"+$scene+"/"; if (`filetest -d ($path+$subdir)` == 0 ) { sysFile -makeDir ($path+$subdir); } int $i; int $start = `playbackOptions -q -min`; int $end = `playbackOptions -q -max`; string $seqScene; for ($i = $start; $i <= $end; $i++) { currentTime -e $i; dgdirty -a; $seqScene = $scene+"_"+pad($i,4); $seqScene = $path+$subdir+"/"+$seqScene; file -rename $seqScene; file -op "v=0" -typ "mayaBinary" -pr -es $seqScene; } file -rename ($path+"/"+$scene); return ("Saved to: " +$seqScene); }