glmBatchCrowdSimulationExporter

The glmBatchCrowdSimulationExporter commands is used to export Simulation Cache files in Maya batch mode which can be used to render a crowd simulation. In Batch mode, Golaem Crowd and Maya do not compute/update all their simulation nodes. Thus, to be able to export a crowd simulation in Maya batch it is required to enable the batch mode computation and explicitly update those nodes. To enable the batch mode, it is required to set the  environment variable GLMCROWD_BATCH_ENABLE to 1 (for more information about Environment Variables, check here). The command glmBatchCrowdSimulationExporter handles all those settings.

Syntax is similar to glmCrowdSimulationExporter

Flags

Flags are similar to glmCrowdSimulationExporter.

Return Value

This command returns nothing

MEL Examples

// batch export Simulation Cache files only between frame 1 and 100
glmBatchCrowdSimulationExporter -startFrame 1 -endFrame 100 -crowdFieldNode "crowdField1" -exportFromCache 0  -scExpAttrs "particleId" -scExpName "testScene" -scExpOutDir "N:/tests/export";

Python Examples

import maya.cmds as cmds
# batch export Simulation Cache files only between frame 1 and 100
cmds.glmBatchCrowdSimulationExporter(startFrame=1, endFrame=100, crowdFieldNode=["crowdField1"], exportFromCache=0, scExpAttrs=["particleId"], scExpName="testScene", scExpOutDir="N:/tests/export")

Usage with Maya Batch

A MEL file usable by Maya Batch and calling this command can be created by the Simulation Exporter. Once created it can be called using the following system command:

pathToMaya\bin\maya.exe -batch -script "pathToMelScript/myCache.batch.mel" -log "pathToLog/batchRender.log"