AnimCurveFloat

- class AnimCurveFloat
An animation curve for floating point values. That type of curves contains tangents.
Once a curve is modified, it has to be normalized by a call to AnimCurveFloat::normalize() or Channel::set_animation_curve().
Methods
__getitem__operator[](n: int) -> Key
Constructor(s)
__iter____len__insert_key(key, before)Insert a key and return its index.
insert_key(key: Key,before: bool) -> int
keys(only_selected)Return an iteration on the keys.
normalize(repeat)Normalize the curve once it has been modified to re-apply the tangents modes.
remove_key(i)Remove the i-th key.
set_key(n, key)Set the n-th key.
size()Return the number of keys.
- class Key
An anim curve key.
- __init__()
Key(frame: float,value: float) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,right: Tangent) -> MAQUINA_EXPORT
Construct a key with the right tangent.
The left tangent is the inverse of the right one, set broken_tangents to false.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,left: Tangent,right: Tangent,broken_tangents: bool,selected: bool) -> MAQUINA_EXPORT
Construct a key with both tangents, set broken_tangents to true.
- Return type
MAQUINA_EXPORT
Key(frame: float,value: float) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,right: Tangent) -> MAQUINA_EXPORT
Construct a key with the right tangent.
The left tangent is the inverse of the right one, set broken_tangents to false.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,left: Tangent,right: Tangent,broken_tangents: bool,selected: bool) -> MAQUINA_EXPORT
Construct a key with both tangents, set broken_tangents to true.
- Return type
MAQUINA_EXPORT
Key(frame: float,value: float) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,right: Tangent) -> MAQUINA_EXPORT
Construct a key with the right tangent.
The left tangent is the inverse of the right one, set broken_tangents to false.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,left: Tangent,right: Tangent,broken_tangents: bool,selected: bool) -> MAQUINA_EXPORT
Construct a key with both tangents, set broken_tangents to true.
- Return type
MAQUINA_EXPORT
Key(frame: float,value: float) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f) -> MAQUINA_EXPORT
Construct a key with automatic tangents.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,right: Tangent) -> MAQUINA_EXPORT
Construct a key with the right tangent.
The left tangent is the inverse of the right one, set broken_tangents to false.
- Return type
MAQUINA_EXPORT
Key(key: Imath.V2f,left: Tangent,right: Tangent,broken_tangents: bool,selected: bool) -> MAQUINA_EXPORT
Construct a key with both tangents, set broken_tangents to true.
- Return type
MAQUINA_EXPORT
- property broken_tangents
Broken tangent.
- Type
broken_tangents (bool)
- property left
The left tangent.
- Type
left (Tangent)
- property right
The right tangent.
- Type
right (Tangent)
- property selected
Is the key selected in the curve editor.
- Type
selected (bool)
- __init__()
Constructor(s)
AnimCurveFloat ()
Create an empty curve.
AnimCurveFloat (v: Value)
Cast a Value object in curve.
If v has not the good type, a default value is constructed.
AnimCurveFloat (keys: list(Key),repeat: bool)
Create a curve using keys.
- insert_key(key: Key, before: bool) int
Insert a key and return its index.
If the key is at the same time than another key, the key is inserted BEFORE the previous keys if before is true, AFTER if before is false. Return the index of the inserted key
- Return type
int
- interpolate()
insert_key(key: Key,before: bool) -> int
Insert a key and return its index.
If the key is at the same time than another key, the key is inserted BEFORE the previous keys if before is true, AFTER if before is false. Return the index of the inserted key
- Return type
int
- keys(only_selected: bool) Keys
Return an iteration on the keys.
- Parameters
only_selected (bool) – If true, iterate only on the keyframes selected in the curve editor
- Return type
- normalize(repeat: bool) None
Normalize the curve once it has been modified to re-apply the tangents modes.
If the curve is set using Channel::set_animation_curve(), no need to normalize it, the method does the job.
- remove_key(i: int) None
Remove the i-th key.
- set_key(n: int, key: Key) None
Set the n-th key.
set_key(key: Key) -> int
Add the key or replace the exisiting one at the same frame.
Return the index of the new/modified key
- Return type
int
set_key(n: int,key: Key) -> None
Set the n-th key.
set_key(key: Key) -> int
Add the key or replace the exisiting one at the same frame.
Return the index of the new/modified key
- Return type
int
- size() int
Return the number of keys.
- Return type
int