glmHistory

glmHistory command provides a way to add, remove and manipulate operations in a Simulation Cache Layout.

glmHistory [-node string] [-edit] [-open string] [-import string] [-count] [-transformId integer] [-idMoved integer] [-type] [-typeList] [-typeStringList] [-delete] [-enable boolean] [-setCurrent] [-entityIds string] [-transform] [-translateX float] [-translateY float] [-translateZ float] [-rotateX float] [-rotateY float] [-rotateZ float] [-scale float][-kill boolean][-duplicate][-selection][-export string][-cacheDir string][-crowdFields string][-timeOffsetMin float][-timeOffsetMax float][-timeWarpMin float][-timeWarpMax float][-scaleRangeMinfloat][-scaleRangeMax float][-snapTo string][-forceSnapTo][-transformGroupId integer][-group][-grpName string][-grpFrom float][-grpTo float][-remap]

Flags

Long name (short name) Argument types Properties Description
-node (-nd) string mandatory specifies a Simulation Cache Proxy or the Crowd Manager to modify history
-edit (-e)     specifies if command is in edit or query mode
-open (-o) string   specifies a GSCL file to load
-import (-i) string   specifies a GSCL file to merge with already existing history
-count (-ct)     specifies if the command should return the transforms count in query mode
-transformId (-id) integer   specifies the transform index to query or edit 
-idMoved (-imv) integer   specifies the transform index to swap with previous tranformId
-type (-t)     specifies the transform type to query for the transform
-typeList (-tl)     specifies that the query must return an integer array with all the transforms type
-typeStringList (-tsl)     specifies that the query must return a string array with all the transforms type
-delete (-d)     specifies that the transform should be deleted
-enable (-en) boolean   specifies if the transform should be enabled or disabled
-setCurrent (-sc)     specifies the current transform. Transformations before will be enabled and those later will be disabled
-entityIds (-eid) string   specifies the entity IDs that the operation will work on
-transform (-tr)     specifies if the transform values for translation, scale or rotation should be set
-translateX (-trx) float   specifies the X component of the translation
-translateY (-try) float   specifies the Y component of the translation
-translateZ (-trz) float   specifies the Z component of the translation
-rotateX (-rox) float   specifies the X component of the Euler rotation
-rotateY (-roy) float   specifies the Y component of the Euler rotation
-rotateZ (-roz) float   specifies the Z component of the Euler rotation
-scale (-s) float   specifies the uniform scale factor
-kill(-k) boolean   specifies if selected entities should be flagged as killed
-duplicate(-dp)     specifies that the selected entities should be duplicated
-selection(-se)     specifies that the command should return a comma separated string containing selected entities Id or select entities in Edit Mode
-export(-ex) string   specifies the cache name to export
-cacheDir(-cd) string   specifies the destination files directory
-crowdFields(-cf) string   specifies the Crowd Field corresponding to the output file
-timeOffsetMin(-tmi) float   specifies the min bound of the randomized time offset
-timeOffsetMax(-tma) float   specifies the max bound of the randomized time offset
-timeWarpMin(-twi) float   specifies the min bound of the randomized time warp
-timeWarpMax(-twa) float   specifies the min bound of the randomized time warp
-scaleRangeMin(-sri) float   specifies the min bound of the randomized scale
-scaleRangeMax(-sra) float   specifies the min bound of the randomized scale
-snapTo(-st) string   specifies the name of the Population Locator
-forceSnapTo(-fst)     specifies if the snap to positions must be recomputed
-transformGroupId(-tgi) integer multi-use specifies the transform Id to group
-group(-gp)     specifies command will make a transform group
-grpName(-gpn) string   specifies the group name
-grpFrom(-gpf) float   specifies first transform Id to be grouped
-grpTo(-gpt) float   specifies last transform Id to be grouped
-remap(-rmp)     specifies that transforms group Ids must be remapped

MEL Examples

 
// change the translation values for transform 1 of cacheProxyShape1
glmHistory -node "cacheProxyShape1" -edit -transformId 1 -transform -translateX 1.0 - translateY 0.0 -translateZ 2.0
// Result: 1 //
 
// query all operations types of cacheProxyShape1
glmHistory -node "cacheProxyShape1" -typeStringList
// Result: Translate Rotate Translate // 
 
// Add a translate (0,0,-3) operation on selected entities of cacheProxyShape1
glmHistory -nd "cacheProxyShape1" -edit -eid `glmSimulationCacheCmd -cacheProxy "cacheProxyShape1" -selection` -translateX 0.000 -translateY 0.000 -translateZ -3.000;
 
// Select entities 1001 and 2001 of cacheProxyShape1
glmHistory -e -node "cacheProxyShape1" -entityIds "1001, 2001" -selection;
 
// Select the 8 first entities of cacheProxyShape1
glmHistory -e -node "cacheProxyShape1" -entityIds "0-8001" -selection;
 
// delete second transformation on cacheProxyShape1
glmHistory -nd "cacheProxyShape1" -edit -transformId 2 -delete
 
// kill entity 1001 and save transform history
glmHistory -edit -node "cacheProxyShape1" -kill true -entityIds "1001";
glmHistory -e -node "cacheProxyShape1" -export "25a-cacheEditor" -cacheDir "d:/export" -crowdFields "crowdField1";
 
// query all selected entities of cacheProxyShape1
glmHistory -node "cacheProxyShape1" -selection
// Result: 1001,2001,3001,5001, // 
 
// group Transforms from 1 to 3 into a default named group
glmHistory -nd "cacheProxyShape1" -edit -group -grpFrom 1 -grpTo 3;
 
// rename group with id 0 to "groupName"
glmHistory -nd "cacheProxyShape1" -edit -group -id 0 -grpName "groupName";