Module _curvelib :: Class AnimCurve
[hide private]
[frames] | no frames]

Class AnimCurve

object --+        
         |        
      Flag --+    
             |    
     BaseCurve --+
                 |
                AnimCurve

An animated curve. The curve is described as a series of key values (instances of the AnimCurveKey class) which say what value it should have a particular time. For any time in between keys, the neighbouring key values are interpolated based on a curve type and interpolation settings specified at each key.

Each curve can only represent a single floating point value over time.

Instance Methods [hide private]
 
__delattr__(...)
x.__delattr__('name') <==> del x.name
 
__getattribute__(...)
x.__getattribute__('name') <==> x.name
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
None
addKey(self, time, value)
self.addKey(keyObj) -> None Add a new key to this curve.
float
evaluate(self, time)
Calculate the value of the curve at a specific time, the pass that in to the expression for the curve.
float
evaluateY(self, time)
Calculates the value of the curve at a specific time.
AnimCurveKey
getKey(self, index)
Returns one of the keys on this curve.
int
getNumberOfKeys(self)
Returns the number of keys along this curve.
bool
isDefault(self)
Check whether this curve has been modified away from its default values.
None
removeAllKeys(self)
Removes all keys from this curve.
None
removeKey(self, timeOrHash)
Remove an existing key from this curve.
None
reset(self)
Reset this object to its default values.

Inherited from Flag: getFlag, setFlag

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

Class Variables [hide private]
  kDefaultConstantValue = 0.0

Inherited from BaseCurve: kDefaultCurveFlag, kDefaultCurveTension, kDefaultCurveType

Properties [hide private]
  constantValue
The constant (not-animated) value for this curve, if any.
  expressionString
The expression string for the this curve, if any.
  useExpression
Whether or not to use the expression string to calculate a value for this curve.

Inherited from BaseCurve: curveTension, curveType, name

Inherited from object: __class__

Method Details [hide private]

__delattr__(...)

 

x.__delattr__('name') <==> del x.name

Overrides: object.__delattr__

__getattribute__(...)

 

x.__getattribute__('name') <==> x.name

Overrides: object.__getattribute__

__new__(T, S, ...)

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

__setattr__(...)

 

x.__setattr__('name', value) <==> x.name = value

Overrides: object.__setattr__

addKey(self, time, value)

 

self.addKey(keyObj) -> None Add a new key to this curve. You can pass in either a time and value pair (the value parameter is optional), or an AnimCurveKey object you've created yourself. In the former case, a new AnimCurveKey object will be created and added to the curve; in the latter case, the key you pass in will be added directly.

Returns: None

evaluate(self, time)

 

Calculate the value of the curve at a specific time, the pass that in to the expression for the curve. The return value is the result of the expression.

Returns: float

removeKey(self, timeOrHash)

 

Remove an existing key from this curve. The key is identified by either the time it occurs at, or its hash (as returned by the key's getHash() method.

Returns: None