glmExportMotion

glmExportMotion command provides a way to export a motion like the Character Maker does automatically.
DoubleArray glmExportMotion [-outputFile string] [-fromInputMotionFile string] [-fromRoot string] [-characterFile string] [-firstFrame int] [-lastFrame int] [-conversionFactor float] [-animationInBlindData boolean] [-frequency float] [-deltaPositionX float] [-deltaPositionY float] [-deltaPositionZ float] [-totalDeltaOrientationHeading float] [-totalDeltaOrientationAttitude float] [-totalDeltaOrientationBank float] [-movingDirectionX float] [-movingDirectionY float] [-movingDirectionZ float] [-blendFromStartOfMotion] [-firstBlendingFrame int] [-lastBlendingFrame int] [-footprintsOnChannel int] [-automaticFootprints] [-speedThreshold float] [-groundHeightThreshold float] [-footprintsAnimCurveChannel int] [-footprintsAnimCurve string]

Flags

Long name (short name) Argument types Properties Description
-outputFile (-of) string   defines the output file (*.gmo or *.xml)
-fromInputMotionFile (-imf) string   defines the input motion file to modify (*.gmo)
-fromRoot (-ro) string   defines the root node used to load the motion from the joint hierarchy
-characterFile (-chf) string   defines the character file containing the Golaem Skeleton
-firstFrame (-ftf) integer   specifies the first frame of the cropped Motion
-lastFrame (-ltf) integer   specifies the last frame of the cropped Motion
-conversionFactor (-cf) float   specifies the conversion factor for the Motion import
-animationInBlindData (-bd) boolean   if source animation should be saved in blind data
-frequency (-frq) float   specifies the frequency of the motion, in frames per second
-deltaPositionX (-dpx) float   specifies the x translation of the Pelvis bone during the motion
-deltaPositionY (-dpy) float   specifies the y translation of the Pelvis bone during the motion
-deltaPositionZ (-dpz) float   specifies the z translation of the Pelvis bone during the motion
-totalDeltaOrientationHeading (-doh) float   specifies the heading rotation of the Pelvis bone during the motion
-totalDeltaOrientationAttitude (-doa) float   specifies the attitude rotation of the Pelvis bone during the motion
-totalDeltaOrientationBank (-dob) float   specifies the bank rotation of the Pelvis bone during the motion
-movingDirectionX (hdx) float   specifies the moving direction X axis
-movingDirectionY (hdy) float   specifies the moving direction Y axis
-movingDirectionZ (hdz) float   specifies the moving direction Z axis
-blendFromStartOfMotion (-bfs) boolean   if present blend the motion so that the start frame becomes identical to the end frame. Without this flag the last frame becomes identical to the start frame
-firstBlendingFrame (-fbf) int   specifies the first frame from which to linearly increase or decrease the error between the start frame and end frame of the motion. If the First Frame To Blend and the Last Frame To Blend are identical, no blending is done
-lastBlendingFrame (-lbf) int   specifies the last frame from which to linearly increase or decrease the error between the start frame and end frame of the motion. If the First Frame To Blend and the Last Frame To Blend are identical, no blending is done
-footprintsOnChannel (-foc) string multi-use specifies the Limb bone name on which apply the footprints
-automaticFootprints(-af) boolean   if present footprints are detected automatically
-speedThreshold (-st) float   specifies the speed of a Limb's end bone under which a footprint is detected on the Limb in Manual Computation Mode
-groundHeightThreshold (-ght) float   specifies the height of a Limb's end bone under which a footprint is detected on the Limb in Manual Computation Mode.
-footprintsAnimCurve (-fac)  string multi-use specifies the custom animCurves name to apply

Return Value

This command returns an array of 3 values if it's used with the "-fromRoot" option and succeeded, or an int value otherwise (1 for success, 0 for failure).
When it returns an array of 3 values, it corresponds to the mean conversion error on position / orientation / scale (same than the Golaem Conversion Quality in the user interface for motion export: http://golaem.com/content/doc/golaem-crowd-documentation/motion-tab)

MEL Examples

// export a motion from a pre-loaded character with custom animCurve
glmExportMotion -outputFile "myMotion.gmo" -fromRoot "Root_Character" -characterFile "mySkeletonFile.gcha" -footprintsOnChannel "LeftFoot" -footprintsAnimCurve "myFirstAnimCurve" -footprintsOnChannel "RightFoot" -footprintsAnimCurve "mySecondAnimCurve" ;
// Result: 1.268263 0.29183 0.0040076 //
 
// modify and export a motion from a input motion file
glmExportMotion -outputFile "myMotion.gmo" -fromInputMotionFile "originalMotion.gmo" -automaticFootprints ;
// Result: 1 //