Bezier Controller Keys

For Bezier controller keys, the following properties are accessible:


<key>.time Time

Time value or number (interpreted as frames)

<key>.selected Boolean

Specifies whether the key is selected

<key>.value varies

Class determined by its containing controller

<key>.inTangent varies -- float or point3 (see below)

<key>.outTangent varies -- float or point3 (see below)

<key>.inTangentType Name -- see list of permitted names below

<key>.outTangentType Name -- see list of permitted names below

<key>.inTangentLength Float

<key>.outTangentLength Float

<key>.freeHandle Boolean

<key>.x_locked Boolean default: true

<key>.y_locked Boolean default: true

<key>.z_locked Boolean default: true

<key>.constantVelocity Boolean default: false

The .inTangent and .outTangent values are Floats in keys of float controllers and Point3s for the other appropriate controllers. Default value is 0 for float controllers, [0,0,0] otherwise.

The .inTangentType and .outTangentType properties have symbolic name values representing the possible tangent types available in the drop-down menu in the Bezier key property dialog:








.inTangentLength and .outTangentLength, (typically a fraction from 0 to 1) represent how long the handle is towards the adjacent key. For example, a value of 0.5 means the handle reaches halfway from the current key to the adjacent key, and a value of 1 reaches all the way. If the handle reaches beyond the adjacent key, it will be greater than one. If there is no previous key, the value of .inTangentLength will be -1.

There is a check box to the key property/Master Point control dialog found in the Motion Panel. It is called Free Handle. When Free Handle is checked, the user can move the horizontal handle where ever s/he feels. Otherwise, s/he is constrained, to prevent discontinuities.

Correspondingly, there is a bezier key property called .freeHandle that implements the functionality described above.



c = bezier_position () -- create and assign new controller

$bar.pos.controller = c

k = addNewKey c 0f -- add a key at frame 0

k.value = [10,0,0] -- set value there

k.outTangentType = #slow -- and outgoing tangent type

k = addNewKey c 100f -- add another key at 100

k.value = [200,10,0] -- set value

k.inTangentType = #custom -- make inTangent custom

k.inTangent = [0.2, 0.02, 0.112] -- set its tangents

k.x_locked = false -- and unlock handles


There are a fair number of classes that don't implement the showproperties method. MAXKey is one of them. getPropNames is not implemented for it either.

See also

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods