Curve Parameters

Basics

Parameter.isAnimated() → bool

True if the parameter contains keyframes to interpolate the value.

Parameter.hasKey(time) → bool

True if the animated parameter has a keyed value at the given time.

Parameter.getKeys() → list of float

Get a list of the times for each animated key.

Parameter.setKey(time, sendNotifyMessage=True)

Sets the value at a given time as an animated key value.

Parameter.moveKeys(timeSequence, dt)

Moves keys (by deleting and re-creating) by a given time offset.

Parameter.removeKey(time)

Unsets a keyed value at the given time.

Parameter.removeKeys(timeSequence)

Unsets keyed values at the listed times.

Parameter.makeConstant(time)

Set number parameter to a constant value (reset curve and/or expression). The new value will be the previous animated value evaluated at ‘time’.

Auto Key

Parameter.getAutoKey() → bool

Return the parameter’s autokey flag (if True, setValue() will create a key).

Parameter.setAutoKey(autoKey)

Set the parameter’s autokey flag (if True, setValue() will create a key).

Parameter.setValueAutoKey(value, time, final=True)

Sets the value of the parameter at the given time. The value’s type is dictated by the parameter type; float, curve, etc. If this is an interactive value, set final=False.

Floating Curves

Floating curves are used to register temporary value changes that have not yet been committed. These temporary curves are wiped out whenever the user changes the current frame.

Parameter.hasFloatingCurve() → bool

Returns True if number parameter currently has a floating curve.

Parameter.resetFloatingCurve()

Removes floating curve from a number parameter.

FCurve

Parameter.getCurve() → FCurve

Get the FCurve object representing the animated values for this parameter.

Parameter.setCurve(curve, final=True)

Set the FCurve object representing the animated values for this number parameter.