All common MAXScript key functions like deleteKey, selectKeys, moveKeys, and others can be used with Biped keys with the exceptions of addNewKey and deleteKeys. These methods are substituted with the following methods.
Method
biped.addNewKey <biped_controller> <time> [#select]
Where,
<time>
Adds a new key to the controller track at the specified time.
[#select]
The new key is also selected if the #select optional argument is specified.
The value for the new key is the interpolated controller value at the specified time. The value for the new key is the interpolated controller value at that time. The new key is also selected if the#select optional argument is specified.
addNewKey() will not add a key if a key already exists at the specified time. The return value is the key located at the specified time.
Method
biped.deleteKeys <biped_controller> [#allKeys] [#selection]
Where,
[#allKeys]
Deletes all the controller’s keys. The default if no other arguments specified.
[#selection]
Deletes the selected keys.
Deletes either all keys or all selected keys from the controller. If neither #allKeys or #selection is specified, all keys are deleted.
Accessing a Biped controller key by indexing into the .keys property of the controller returns a type of key that MAXScript does not recognize. To get a Biped controller key by index use the following method:
Method
biped.getKey ( <biped_controller> | <footstep_ctrl> ) <index>
Where,
<biped_controller>
A biped object controller
<footstep_ctrl>
A biped footstep controller
<index>
Which key to retrieve from the controller
Returns an instance of BipedKey for Biped body controllers and BipedFSKey for footstep controllers. BipedKey and BipedFSKey are defined below.
Not all of the Biped elements contain their own transform controller. Rather, a controller on an object typically higher in the hierarchy might store the transform key for an element. For example, the transforms for all the fingers on a hand are stored in either the Finger0 or Clavicle transform controller. This depends on whether "Separate Tracks for Arms" is set to true or false, respectively.
The following example will get the first key for each of the subcontrollers of the $Bip01 Vertical_Horizontail_Turn transform controller and show their properties.
EXAMPLE
bipObj = biped.createNew 100 100 [0,0,0] -- select bipObj bip = bipObj.transform.controller -- Obtain the subcontrollers vertCont = bip.vertical.controller horzCont = bip.horizontal.controller turnCont = bip.turning.controller -- Add some keys biped.addNewKey vertCont 1 biped.addNewKey horzCont 1 biped.addNewKey turnCont 1 -- Get the first key for each subcontroller vk = biped.getKey vertCont 1 hk = biped.getKey horzCont 1 tk = biped.getKey turnCont 1 -- Show the properties for the individual subcontroller key types showProperties vk showProperties hk showProperties tk