All common MAXScript key functions like deleteKey, selectKeys, moveKeys etc. can be used with Biped keys. The exceptions addNewKey and deleteKeys are substituted with the following methods.
Method
biped.addNewKey <biped_controller> <time> [ #select ]
<time> Adds a new key to the controller track at the time specified.
[ #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 ]
[ #allKeys ]
[ #selection ]
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>
<biped_controller>
<footstep_ctrl>
<index>
Notes
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 a transform controller. Rather, a controller on an object typically higher in the hierarchy may 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. Additionally, the first key of the $Bip01 Footstep transform controller will have its properties shown.
Example:
bip = $Bip01.transform.controller
-- Obtain the subcontrollers
vertCont = bip.vertical.controller
horzCont = bip.horizontal.controller
turnCont = bip.turning.controller
-- 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
-- Obtain the Biped's Footstep controller
fsCont = $'Bip01 Footsteps'.transform.controller
-- Show the Footstep controller properties
showProperties fsCont
-- Get the first Footstep controller key
fk = biped.getkey fsCont 1
showProperties fk
See also