animation_curve_optimize
Functions
Computes importance by checking Position AND Slope integrity. Uses exact derivative calculation instead of neighbor sampling
Will remove keyframes that do not affect the shape of the curve significantly. The error tolerance determines the significance degree. Intended to reduce the complexity of a curve to improve performance and lower memory usage
compute_keyframe_value_effect(key_middle, key_previous, key_next) ⇒ number
Computes importance by checking Position AND Slope integrity. Uses exact derivative calculation instead of neighbor sampling
Kind: global function
Returns: number - value delta if the middle frame is removed, the higher this value - the more important the middle keyframe is
Author: Alex Goldring
Copyright: Company Named Limited (c) 2025
| Param | Type |
|---|---|
| key_middle | Keyframe |
| key_previous | Keyframe |
| key_next | Keyframe |
animation_curve_optimize(curve, [error_tolerance]) ⇒ number
Will remove keyframes that do not affect the shape of the curve significantly. The error tolerance determines the significance degree. Intended to reduce the complexity of a curve to improve performance and lower memory usage
Kind: global function
Returns: number - number of removed keys, 0 if curve was unchanged
Author: Alex Goldring
Copyright: Company Named Limited (c) 2025
| Param | Type | Description |
|---|---|---|
| curve | AnimationCurve | The curve to optimize. The curve is modified in place. |
| [error_tolerance] | number | how much of a loss to accept, this is relative to normalized value bounds of the curve |