glmSimulationCacheMerge

The glmSimulationCacheMerge command allows to multiple Simulation Cache together based on Simulation Cache Proxy nodes in the current scene or on a Simulation Cache Library.
bool glmSimulationCacheMerge [-fromScene] [-fromLibrary string] [-mergeCrowdFields] [-mergeLayouts] [-outCrowdField string] [-outCacheName string] [-outCacheDir string] [-outLayoutDir string] [-outLayoutName string] nodeNames;

Flags

Long name (short name) Argument types Properties Description
-fromScene (-sce)     If set, the specified node names will be fetched from the current scene. Either -fromScene or -fromLibrary need to be set.
-fromLibrary (-lib)     If set, the specified node names will be fetched from the Simulation Cache Library file path passed as a parameter. Either -fromScene or -fromLibrary need to be set.
-mergeCrowdFields (-mcf)     If set, all input CrowdFields will be merged into the same CrowdField
-mergeLayouts (-ml)     If set, all input Simulation Cache Layout files will be merged into the same Simulation Cache Layout file
-outCrowdField (-ocf) string mandatory Name of the output crowdFields (separated with ";") for the merged Simulation Cache files. If the -mergeCrowdFields is set, only one name is required.
-outCacheName (-ocn) string mandatory Name of the output cache name for the merged Simulation Cache files
-outCacheDir (-ocd) string mandatory Path of the output directory which will be used to write out the merged Simulation Cache files
-outLayoutDir (-old) string mandatory Path of the output directory which will be used to write out the merged Simulation Layout files
-outLayoutName (-oln) string mandatory Name of the output Simulation Layout files (separated with ";") for the merged Simulation Layout files. If the -mergeLayouts is set, only one name is required.

Return Value

This command returns true if the merge was successful

MEL Examples

glmSimulationCacheMerge -fromScene -mcf -ocf "finalField" -ocn "finalCache" -ocd "D:/merged/" -oln "finalLayout" -old "D:/merged/" |cacheProxy1|cacheProxyShape1 |cacheProxy2|cacheProxyShape2 ;
// Result: 1

Python Examples

import maya.cmds as cmds
cmds.glmSimulationCacheMerge(|cacheProxy1|cacheProxyShape1, |cacheProxy2|cacheProxyShape2, fromScene=True, mcf=True, ocf=True, ocn='finalCache', ocd='D:/merged/', oln='finalLayout', old='D:/merged')

// Result: 1