keyframeReduction.classes.keyframeReduction module¶
-
class
keyframeReduction.classes.keyframeReduction.
KeyframeReduction
(path)¶ Bases:
object
-
getFrames
()¶ Returns: List of keyframe frames Return type: list
-
getIndices
()¶ Returns: List of keyframe indices Return type: list
-
getValues
(frames)¶ Parameters: frames (list) – Frames to sample Returns: List of values Return type: list
-
path
¶ Returns: Animation curve path Return type: str
-
reduce
(error=1, step=1, weightedTangents=True, tangentSplitAuto=False, tangentSplitExisting=False, tangentSplitAngleThreshold=False, tangentSplitAngleThresholdValue=15.0)¶ Reduce the number of keyframes on the animation curve. Useful when you are working with baked curves.
Parameters: - error (int/float) –
- step (int/float) –
- weightedTangents (bool) –
- tangentSplitAuto (bool) –
- tangentSplitExisting (bool) –
- tangentSplitAngleThreshold (bool) –
- tangentSplitAngleThresholdValue (int/float) –
Returns: Reduction rate
Return type: float
-
sample
(start, end, step)¶ Sample the current animation curve based on the start and end frame, and the provided step size. Vector2Ds and angles will be returned.
Parameters: - start (int) –
- end (int) –
- step (int/float) –
Returns: Sample points and angles
Return type: list
-