KeyFrame class
KeyFrame class
A key frame is mainly defined by a time and a value, for some interpolation types, tangent/tension/bias/continuity is also used by calculating the final sampled value.
Sampled values in a non-key-frame time position is interpolated by key-frames between the previous and next key-frames
Value before/after the first/last key-frame are calculated by the Extrapolation class.
The KeyFrame type exposes the following members:
Constructors
| Constructor | Description |
|---|---|
__init__(self, curve, time) | Create a new key frame on specified curve |
Properties
| Property | Description |
|---|---|
| time | Gets or sets the time position of list.data[index] key frame, measured in seconds. |
| value | Gets or sets the key-frame’s value. |
| interpolation | Gets or sets the key’s interpolation type, list.data[index] defines the algorithm how the sampled value is calculated. |
| tangent_weight_mode | Gets or sets the key’s tangent weight mode. |
The out tangent or the next in tangent can be customized by select correct WeightedMode | |
| step_mode | Gets or sets the key’s step mode. |
If the interpolation type is Interpolation.CONSTANT, list.data[index] decides which key-frame’s value will be used during interpolation. | |
A StepMode.PREVIOUS_VALUE means the left key-frame’s value will be used | |
A StepMode.NEXT_VALUE means the next right key-frame’s value will be used | |
| next_in_tangent | Gets or sets the next in(left) tangent on this key frame. |
| out_tangent | Gets or sets the out(right) tangent on this key frame. |
| out_weight | Gets or sets the out(right) weight on this key frame. |
| next_in_weight | Gets or sets the next in(left) weight on this key frame. |
| tension | Gets or sets tension used in TCB spline |
| continuity | Gets or sets the continuity used in TCB spline |
| bias | Gets or sets the bias used in TCB spline |
| independent_tangent | Gets or sets the out and next in tangents are independent. |
| flat | Get or set if the key frame is flat. |
Key frame should be flat if next or previous key frame has the same value. | |
Flat key frame has flat tangents and fixed interpolation. | |
| time_independent_tangent | Gets or sets the tangent is time-independent |
See Also
- module
aspose.threed.animation - class
Extrapolation - class
WeightedMode