glmMotionFileTool

The glmMotionFileTool command allows to get / set attributes of a Motion File (.gmo):
various glmMotionFileTool [-motionFile string] [-getAttr string] [-frame int]

Flags

Long name (short name) Argument types Properties Description
-motionFile (-gmo) string mandatory File path to the Motion File to get.
-getAttr (-gat) string mandaoty

Attribute to get. Available attributes are:

  • loopMatch: computes the difference between the posture specified by the frame flag and all the postures
  • nbFrames: number of frames
  • framerate: frame rate
  • limbs: name array of all the available limbs
  • footprints: footprint information for all limbs (can be written to a motion file using the glmExportMotion cmd)
-frame (-fr) int mandatory if getAttr is set to loopMatch Frame of the Motion File to get the value for

Return Value

This command returns either:
  • a float array if -getAttr is set with the value of loopMatch (posture difference for all the postures of the Motion file)
  • an integer if -getAttr is set with the value of nbFrames or framerate
  • a string array if -getAttr is set with the value of nbLimbs or footprints

MEL Examples

int $loopMatch[] = `glmMotionFileTool -motionFile "C:/walk.gmo" -getAttr "loopMatch" -frame 1`;
// Result: 0 529.54 1767.81 3207.06 4401.85 4582.05 3993.48 3128.64 2372.27 1264.88 621.38 0

Python Examples

import maya.cmds as cmds
cmds.glmMotionFileTool (motionFile="C:/walk.gmo", getAttr="loopMatch", frame=1)
// Result: 0 529.54 1767.81 3207.06 4401.85 4582.05 3993.48 3128.64 2372.27 1264.88 621.38 0