MAXScript Extensions > MAXScript Extensions for character studio > Biped MAXScript Extensions > Biped Keys >

# Biped Keys

| Character Studio - Quick Navigation

All common MAXScript key functions like deleteKey, selectKeys, moveKeys etc. 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 thetimespecified.

    [#select]

The new key is also selected if the #selectoptional 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.

Note

The biped COM and props’ controllers are not keyable.

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 Index

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 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.getkeyfsCont 1
    showProperties fk

#### See Also

- BipedKey : MAXObject

- BipedFSKey : MAXObject

- MAXScript Extensions in character studio