nuke.AnimationCurve
- class nuke.AnimationCurve
Bases:
pybind11_objectAnimationCurve(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
self.addKey(keys) -> None.
self.changeInterpolation(keys, type) -> None.
self.clear() -> None.
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.
self.derivative(t, n) -> Float.
self.evaluate(t) -> float Value at time 't'.
self.expression() -> String.
self.fixSlopes() -> None.
self.fromScript(s) -> None.
self.identity() -> bool :return: True if the animation appears to be such that y == x everywhere.
self.integrate(t1, t2) -> Float.
self.inverse(y) -> Float.
self.keys() -> List of keys.
self.knob() -> Knob.
self.knobAndFieldName() -> string.
self.knobIndex() -> Int.
self.noExpression() -> bool :return: True if the expression is the default expression (i.e. the keys control the curve), False otherwise.
self.removeKey(keys) -> None.
self.selected() -> bool :return: True if selected, False otherwise.
self.setExpression(s) -> None.
self.setKey(t, y) -> Key.
self.size() -> Number of keys.
self.toScript(selected) -> str :param selected: Optional parameter.
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.