PDA

View Full Version : Fluid Batch Caching



xcomb
07-30-2006, 09:05 AM
Hi All!

I am kinda stuck and don't know what i need to do in order to get this working.

I have created script that does fluid caching, so my goal is to cache fluids from command line.



here is a script that calculates fluid cache

global proc dynBatchRun()
{
string $sceneName = `file -q -sceneName`;
string $startFrame = `playbackOptions -q -min`;
string $endFrame = `playbackOptions -q -max`;
setAttr globalCacheControl.writeEnable true;
setAttr globalCacheControl.writeEnable false;

doFluidsDiskCache 2 { "mcfp", 3, 1, $startFrame, $endFrame, 2, 1, 1, 1, 1, 1, 1, 1, 0, "$sceneName", 1 } ;

}

so i saved this proc in Maya script folder and also inside scene i created expression to source the mel script.



Here is the command i execute to run in maya batch mode, i did that in command prompt from windows

maya -batch -file wow.mb -command dynRunBatch



I get an error :

Result: ./wow.mb
Error: Cannot find procedure "dynRunBatch".
mental ray: wallclock 0:00:02.88 total
mental ray: allocated 1 MB, max resident 2 MB



What should i do to get this going?

Thanks in Advance!

sunder
08-04-2006, 04:06 PM
Hi xcomb! I took a quick glance at this and it looks like the procedure names don't match up. Try and make the change and see if it works



global proc dynBatchRun()
{
....
}

...
maya -batch -file wow.mb -command dynRunBatch
...