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

Class AnimControlPoint

object --+    
         |    
      Flag --+
             |
            AnimControlPoint

An animated control point.

These are used directly by Stroke objects to store the control point locations. Shape objects use a collection of up to 6 of them to represent each control point (see the ShapeControlPoint class for details).

It is advisable to call changed() on the 'curves' knob after making modifications to curves. This forces the knob to re-cache the state of its curves.

The 'view' argument to the object's methods can be omitted and the default view 'main' will be used.

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
addControlPoint(self, controlPoint)
None
addKey(self, time, controlPointOrDim, view)
None
addPositionKey(self, time, positionOrDim, view)
Adds a new key to the control point's timeline.
ControlPoint
evaluate(self, time, view)
Evaluates the animated control point's position at the specific time.
list of floats
getControlPointKeyTimes(self, view)
Get the list of times at which this control point has a key.
CVec3
getPosition(self, time, view)
Get the position of this control point at a particular time.
AnimCurve
getPositionAnimCurve(self, index, view)
Returns the AnimCurve object containing the time line for the control point.
float
getPositionKeyTime(self, index, keyIndex, view)
Get the time of a particular key for this control point.
None
removeAllKeys(self, view)
None
removeKey(self, time, view)
None
removePositionKey(self, time, view)
None
reset(self)
Resets the control point back to an initial empty state.
None
setPosition(self, position, view)
Sets the control point's 'constant' position (the position used when there are no keys - see AnimCurve for further info).
None
setPositionAnimCurve(self, index, animCurve, view)
Set the point's AnimCurve object (its time line).
None
setPositionKey(self, time, index, value, id, view)
Sets an individual dimension (index) of a key to a specific value.

Inherited from Flag: getFlag, setFlag

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

Properties [hide private]
  dim
The dimensionality, or number of components, for this control point (usually 3 - x, y and pressure).
  hash
The hash value for this control point.
  name
The name of the control point (if any).

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__

addPositionKey(self, time, positionOrDim, view)

 

Adds a new key to the control point's timeline. positionOrDim can either be a vector or a single scalar that specifies which component (xyzw) to add a key for.

Returns: None

getControlPointKeyTimes(self, view)

 

Get the list of times at which this control point has a key. The view parameter is optional.

Returns: list of floats

getPosition(self, time, view)

 

Get the position of this control point at a particular time. The time parameter is a float specifying which time to calculate the position for; the view parameter is the optional view name.

Returns: CVec3

getPositionKeyTime(self, index, keyIndex, view)

 

Get the time of a particular key for this control point. index is 0 for the X coordinate, 1 for Y or 2 for Z. keyIndex is the index of the relevant key. The view parameter is optional.

Returns: float

setPosition(self, position, view)

 

Sets the control point's 'constant' position (the position used when there are no keys - see AnimCurve for further info). Calling this method when the control point has keys will have no effect.

Returns: None

setPositionKey(self, time, index, value, id, view)

 

Sets an individual dimension (index) of a key to a specific value. The key to modify is identified by hash (id). The method fails if there is no key at the specified time.

Returns: None