Biped Load and Save Methods

This topic covers the load and save methods for motion, figure, score, keys, motion capture, and talent files.

-- Motion File Access Methods

biped.LoadBipFile <biped_ctrl> <filename>

Load a biped motion file. Motion files include, footsteps, keyframe settings, the biped scale, and the active gravity value (GravAccel). IK Blend values for the keys and Object Space Object information are also loaded.

biped.SaveBipFile <biped_ctrl> <filename>

Save a biped motion file. A .bip file includes footsteps and keyframe data. Biped files store the complete movement and allow you to create libraries of motion. Create your own .bip library by animating the biped and saving a .bip file.

Notes

Load/Save a Biped (.BIP) file

-- Figure File Access Methods

biped.LoadFigFile <biped_ctrl> <filename>

Load a Figure file. Figure mode must be active to load a Figure file. Figure files allow you to apply the structure of one biped to another. Reload a Figure file if you accidentally lose your biped Figure mode pose; this pose is the biped fitted to a mesh.

biped.SaveFigFile <biped_ctrl> <filename>

Save the structure and position of a biped in Figure mode. After fitting the biped to a mesh in Figure mode, save a figure file. If the biped is accidentally moved in Figure mode, reload this file.

Notes

Load/Save a Figure (*.FIG) file

-- Score File Access Methods

biped.LoadScoreFile <biped_ctrl> <filename>

biped.SaveScoreFile <biped_ctrl> <filename>

Score files are Step files which save footsteps, but don't save body keyframes. They are an ASCII file format that enables developers to write programs that generate step files for biped motion. The online document stp.rtf, provided with character studio in the \cstudio\docs directory, describes the .stp format.

Notes

Load/Save a Step (*.STP) file

-- Motion Capture File Access Methods

biped.loadMocapFile <biped_ctrl> <file_name> [#prompt]

Load a motion capture (.BIP, .BVH, .CSM) file. If #prompt is specified, the file is not automatically loaded, rather the Motion Capture Conversion Parameters dialog is displayed with the specified file as the motion capture file.

-- Talent File Access Methods

biped.adjustTalentPose <biped_ctrl>

After loading a marker file, use Adjust Talent Pose to correct the biped position relative to the markers. Align the biped limbs to the markers then call biped.adjustTalentPose to compute this offset for all the loaded marker data.

Note

Calibration controls are only enabled when a marker or .bvh file is imported in its raw form. Do not use key reduction or extract footsteps when you import a marker file for the first time.

biped.saveTalentFigFile <biped_ctrl> <file_name>

After changing the biped scale in Talent Figure mode, save the changes into a .fig file. Use this file in the Motion Capture Conversion Parameters dialog to adjust marker files created by the same actor.

biped.saveTalentPoseFile <biped_ctrl> <file_name>

Save a Talent Pose adjustment as a .cal file.

Save a .cal file after adjusting the biped relative to the markers. A .cal file is used for processing marker files that require the same adjustment. A .cal file can be loaded in the Motion Capture Conversion Parameters dialog during marker file importation.

-- Layer related methods

biped.collapseAtLayer <biped_ctrl> <index>

Collapses all layers till the specified layer. All underneath should be active for this function to work. Return true if successful, otherwise false.

biped.createLayer <biped_ctrl> <index> <name>

Creates a layer at the specified position, maximum index value can be NumLayers + 1

biped.deleteLayer <biped_ctrl> <index>

Deletes the specified layer

biped.getCurrentLayer <biped_ctrl>

Returns the position of the currently active layer in the UI

biped.getLayerActive <biped_ctrl> <index>

Returns true if the specified layer is active.

biped.getLayerName <biped_ctrl> <index>

Returns the specified layer name

biped.numLayers <biped_ctrl>

Returns the number of layers

biped.setCurrentLayer <biped_ctrl> <index>

Sets the active layer in the UI to the specified layer

biped.setLayerActive <biped_ctrl> <index> <bool_val>

Sets the specified layer to active/inactive based upon the bool_val passed

biped.setLayerName <biped_ctrl> <index> <name>

Sets the specified layer name to the value passed

The following example will create a new Biped, access it's Vertical_Horizontal_Turn(Body) controller and load a specific *.Bip file:

Example:

-- create a new Biped

bipObj = biped.createNew 100 100 [0,0,0]

-- select bipObj

bip = bipObj.transform.controller

max motion mode

-- File I/O

biped.LoadBipFile bip (CSPATH + "scripts\\Limploop.bip")

See also