nuke.AnimationCurve

class nuke.AnimationCurve

Bases: pybind11_object

AnimationCurve(knob, index, name, view) -> AnimationCurve

Construct a new AnimationCurve. :param knob: The knob this animation belongs to. :param index: The slot number in the knob. :param name: Field name. :param view: Optional view name.

Methods

addKey

self.addKey(keys) -> None.

changeInterpolation

self.changeInterpolation(keys, type) -> None.

clear

self.clear() -> None.

constant

self.constant() -> bool :return: True if the animation appears to be a horizontal line, is a simple number, or it is the default and all the points are at the same y value and have 0 slopes.

derivative

self.derivative(t, n) -> Float.

evaluate

self.evaluate(t) -> float Value at time 't'.

expression

self.expression() -> String.

fixSlopes

self.fixSlopes() -> None.

fromScript

self.fromScript(s) -> None.

identity

self.identity() -> bool :return: True if the animation appears to be such that y == x everywhere.

integrate

self.integrate(t1, t2) -> Float.

inverse

self.inverse(y) -> Float.

keys

self.keys() -> List of keys.

knob

self.knob() -> Knob.

knobAndFieldName

self.knobAndFieldName() -> string.

knobIndex

self.knobIndex() -> Int.

noExpression

self.noExpression() -> bool :return: True if the expression is the default expression (i.e. the keys control the curve), False otherwise.

removeKey

self.removeKey(keys) -> None.

selected

self.selected() -> bool :return: True if selected, False otherwise.

setExpression

self.setExpression(s) -> None.

setKey

self.setKey(t, y) -> Key.

size

self.size() -> Number of keys.

toScript

self.toScript(selected) -> str :param selected: Optional parameter.

view

self.view() -> String.

addKey(keys) None.

Insert a sequence of keys. :param keys: Sequence of AnimationKey. :return: None.

changeInterpolation(keys, type) None.

Change interpolation (and extrapolation) type for the keys. :param keys: Sequence of keys. :param type: Interpolation type. :return: None.

clear() None.

Delete all keys. :return: None.

constant() bool
Returns:

True if the animation appears to be a horizontal line, is a simple

number, or it is the default and all the points are at the same y value and have 0 slopes. False otherwise.

derivative(t, n) Float.

The n’th derivative at time ‘t’. If n is less than 1 it returns evaluate(t). :param t: Time. :param n: Optional. Default is 1. :return: The value of the derivative.

evaluate(t) float

Value at time ‘t’. :param t: Time. :return: The value of the animation at time ‘t’.

expression() String.

Get the expression. :return: String.

fixSlopes() None.
Returns:

None.

fromScript(s) None.
Parameters:

s – String.

Returns:

None.

identity() bool
Returns:

True if the animation appears to be such that y == x everywhere.

integrate(t1, t2) Float.

Calculate the area underneath the curve from t1 to t2. :param t1 The start of the integration range. :param t2 The end of the integration range. :return: The result of the integration.

inverse(y) Float.

The inverse function at value y. :param y: The value of the function to get the inverse for. :return: Float.

keys() List of keys.
Returns:

List of keys.

knob() Knob.

Return knob this animation belongs to. :return: Knob.

knobAndFieldName() string.

Knob and field name combined (e.g. ‘translate.x’). :return: string.

knobIndex() Int.

Return the knob index this animation belongs to. :return: Int.

noExpression() bool
Returns:

True if the expression is the default expression (i.e. the keys

control the curve), False otherwise.

removeKey(keys) None.

Remove some keys from the curve. :param keys: The sequence of keys to be removed. :return: None.

selected() bool
Returns:

True if selected, False otherwise.

setExpression(s) None.

Set expression. :param s: A string containing the expression. :return: None.

setKey(t, y) Key.

Set a key at time t and value y. :param t: The time to set the key at. :param y: The value for the key. :return: The new key.

size() Number of keys.
Returns:

Number of keys.

toScript(selected) str
Parameters:

selected – Optional parameter. If True, only process selected curves.

Returns:

A string containing the curves.

view() String.

The view this AnimationCurve object is associated with. :return: String.