For Bezier controller keys, the following properties are accessible:
Properties
<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>.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 6 possible tangent types available in the drop-down menu in the Bezier key property dialog:
#smooth (default)
#linear
#step
#fast
#slow
#custom
Examples:
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
See also