Dynamic lightmap

Hi all,
hopefully someone can help.

I am exporting a maya model, that is animated to smoke to be comped.

The model i am going to export will have various textures, these will be applied in smoke.

I am currently using the 'mental ray baking options' to bake in specular but this does it for one frame only

Is there a way to bake it dynamically per frame basis or would it be a case of scripting this?

Any help would be amazing!

Running jr

Mostly a script and what dynamics does is the same thing

/*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];
}