/*jooCCRequestedBatchBakeAllFramesInRange.mel 0.1 Author: Janne 'Joojaa' Ojala Testing: Briefly tested License: Creative Commons, Attribute. Request by: Dil Bhakar About: Simple script script for batch baking multiple frames. Frame numbers are prefixed to the bake name. Install Instructions: place this text in a file named: jooCCRequestedBatchBakeAllFramesInRange.mel that resides in your personal Maya script directory. Usage: Assign all your baking need into bake sets then run: jooCCRequestedBatchBakeAllFramesInRange 1 12; from a command line. where 1 is the frame to start from and 12 where to end. Known issues: Script can not be interrupted. Changelist: 21.08.2012 - created *****************************************************************/ proc jooCCRequestedBatchBakeAllFramesInRange(int $startFrame, int $endFrame){ string$prefix[]; string$bakesets[] = `ls -et textureBakeSet`; for($b = 0;$b< size($bakesets);$b++) $prefix[$b] = (string)`getAttr ($bakesets[$b]+".prefix")`; for($i = $startFrame;$i<= $endFrame;$i++){ currentTime $i; for($b = 0;$b< size($bakesets);$b++) setAttr -type "string"($bakesets[$b]+".prefix")("frm_"+$i+"_"+$prefix[$b]); print `convertLightmapSetup -camera persp -ulb -keepOrgSG -showcpv -bakeAll`; } for($b = 0;$b< size($bakesets);$b++) setAttr -type "string"($bakesets[$b]+".prefix")$prefix[$b]; }
Hi all,
I am exporting a maya model, that is animated to smoke to be comped.
Any help would be amazing!
Running jr