Animation: Common curve drawing for FCurves #110764
Before this patch, the drawing code iterated the FCurve to see if there are any
curve interpolation types that can't easily be drawn. (Sinusoidal, Bounce, etc)
If it found one, it would fall back to evaluating the FCurve.
That meant in the worst case scenario it would iterate the whole FCurve
before even starting to draw.
This PR unifies the drawing logic for FCurves no matter their interpolation type.
If it encounters a key type that it can't draw, it falls back to samples, but only
for the current key.
To clarify that it renames
Curves with modifiers are still drawn with samples.
Test setup: 6000f of dense data on 62 bones. Only measuring the average draw time per curve. All measurements were done at the same zoom level.
|mix (~1/2 of the view with elastic)||110μs||24μs|
The performance boost with "only elastic" can be explained by the fact that per key I can skip 1 call to
evaluate_fcurve. That is because I always start at an existing keyframe so I can use its position.
Love this change. Way clearer and simpler this way.
Just one issue with computing the step size of the fcurve evaluation. (Very much the kind of mistake I would make, too!)
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?