Package nuke :: Class AnimationCurve
[hide private]
[frames] | no frames]

Class AnimationCurve

object --+
         |
        nuke.AnimationCurve

AnimationCurve

Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(T, S, ...)
None
addKey(self, keys)
Insert a sequence of keys.
None
changeInterpolation(self, keys, type)
Change interpolation (and extrapolation) type for the keys.
None
clear(self)
Delete all keys.
bool
constant(self)
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.
Float
derivative(self, t, n)
The n'th derivative at time 't'.
float
evaluate(self, t)
Value at time 't'.
String
expression(self)
Get the expression.@return: String.
None
fixSlopes(self)
Returns: None.
None
fromScript(self, s)
Returns: None.
bool
identity(self)
Returns: True if the animation appears to be such that y == x everywhere.
Float
integrate(self, t1, t2)
Calculate the area underneath the curve from t1 to t2.
Float
inverse(self, y)
The inverse function at value y.
List of keys
keys(self)
Returns: List of keys.
Knob
knob(self)
Return knob this animation belongs to.@return: Knob.
string
knobAndFieldName(self)
Knob and field name combined (e.g.
Int
knobIndex(self)
Return the knob index this animation belongs to.@return: Int.
bool
noExpression(self)
Returns: True if the expression is the default expression (i.e.
None
removeKey(self, keys)
Remove some keys from the curve.
bool
selected(self)
Returns: True if selected, False otherwise.
None
setExpression(self, s)
Set expression.
Key
setKey(self, t, y)
Set a key at time t and value y.
Number of keys
size(self)
Returns: Number of keys.
str
toScript(self, selected)
Returns: A string containing the curves.
String
view(self)
The view this AnimationCurve object is associated with.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

addKey(self, keys)

 

Insert a sequence of keys.

Parameters:
  • keys - Sequence of AnimationKey.
Returns: None
None.

changeInterpolation(self, keys, type)

 

Change interpolation (and extrapolation) type for the keys.

Parameters:
  • keys - Sequence of keys.
  • type - Interpolation type. One of nuke.HORIZONTAL, nuke.BREAK, nuke.BEFORE_CONST, nuke.BEFORE_LINEAR, nuke.AFTER_CONST or nuke.AFTER_LINEAR.
Returns: None
None.

clear(self)

 

Delete all keys.

Returns: None
None.

constant(self)

 
Returns: bool
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(self, t, n)

 

The n'th derivative at time 't'. If n is less than 1 it returns evaluate(t).

Parameters:
  • t - Time.
  • n - Optional. Default is 1.
Returns: Float
The value of the derivative.

evaluate(self, t)

 

Value at time 't'.

Parameters:
  • t - Time.
Returns: float
The value of the animation at time 't'.

fixSlopes(self)

 
Returns: None
None.

fromScript(self, s)

 
Parameters:
  • s - String.
Returns: None
None.

identity(self)

 
Returns: bool
True if the animation appears to be such that y == x everywhere. This is True only for an expression of 'x' or the default expression and all points having y == x and slope == 1. Extrapolation is ignored.

integrate(self, t1, t2)

 

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.

Returns: Float
The result of the integration.

inverse(self, y)

 

The inverse function at value y. This is the value of x such that evaluate(x) returns y. This is designed to invert color lookup tables. It only works if the derivative is zero or positive everywhere.

Parameters:
  • y - The value of the function to get the inverse for.
Returns: Float
Float.

keys(self)

 
Returns: List of keys
List of keys.

knobAndFieldName(self)

 

Knob and field name combined (e.g. 'translate.x').

Returns: string
string.

noExpression(self)

 
Returns: bool
True if the expression is the default expression (i.e. the keys control the curve), False otherwise.

removeKey(self, keys)

 

Remove some keys from the curve.

Parameters:
  • keys - The sequence of keys to be removed.
Returns: None
None.

selected(self)

 
Returns: bool
True if selected, False otherwise.

setExpression(self, s)

 

Set expression.

Parameters:
  • s - A string containing the expression.
Returns: None
None.

setKey(self, t, y)

 

Set a key at time t and value y. If there is no key there one is created. If there is a key there it is moved vertically to be at y. If a new key is inserted the interpolation and extrapolation are copied from a neighboring key, if there were no keys then it is set to nuke.SMOOTH interpolation and nuke.CONSTANT extrapolation.

Parameters:
  • t - The time to set the key at.
  • y - The value for the key.
Returns: Key
The new key.

size(self)

 
Returns: Number of keys
Number of keys.

toScript(self, selected)

 
Parameters:
  • selected - Optional parameter. If this is given and is True, then only process the selected curves; otherwise convert all.
Returns: str
A string containing the curves.

view(self)

 

The view this AnimationCurve object is associated with.

Returns: String
String.