glmCharacterFileTool

The glmCharacterFileTool command allows to get / set attributes of a Character File (.gcha):
various glmCharacterFileTool [-characterFile string] [-getAttr string] [-setAttr string] [-value string]

Flags

Long name (short name) Argument types Properties Description
-characterFile (-gch) string mandatory File path to the Character File to get / set.
-getAttr (-gat) string   Attribute to get. Available attributes are: shaders, shaderGroups, shaderAttributes, missingShaders, missingShaderGroups, boundingBoxes, renderingTypes, geoFilePaths, meshAssets, pelvis (for pelvis name), pelvisPosition, bones (for all bone names), sortedBones (for all bone names sorted in the same order than in the Simulation Cache), bonePositions, physicalizedBones, limbs, effectors, blindDataGroups, blindData (will return both Blind Data and Blend Shapes), blindDataInfo, groundHeight
-setAttr (-sat) string   Attribute to set. Available attributes are: fbxFilePaths
-value (-v) string mandatory when setAttr is set Value of the attribute to set

Return Value

This command returns either:
  • a string array if -getAttr is set with the value of shaders, shaderGroups, shaderAttributes, missingShaders, missingShaderGroups, renderingTypes, fbxFilePaths
  • a float array if -getAttr is set with the value of boundingBoxes (first 3 returned values correspond to the bounding box of the first Geometry Group defined in the Character File...)
  • a boolean value if -setAttr is set

MEL Examples

string $shaders[] = `glmCharacterFileTool -characterFile "C:/CMO-man.gcha" -getAttr "shaders"`;
// Result: MAN_MD_body_blinn MAN_MD_legs_pants_blinn MAN_MD_top_hair_blinn MAN_MD_torso_tshirt_blinn //
float $bboxes[] = `glmCharacterFileTool -characterFile "C:/CMO-man.gcha" -getAttr "boundingBoxes"`;
// Result: 5 10 5 //
string $fbx[] = `glmCharacterFileTool -characterFile "C:/CMO-man.gcha" -getAttr "fbxFilePaths"`;
// Result: C:/CMO-man.fbx //

glmCharacterFileTool -characterFile "C:/CMO-man.gcha" -setAttr "fbxFilePaths" -value "D:/CMO-man.fbx"
// Result: 1 //