Refactor the following functions and cover with tests * `BKE_fcurve_calc_bounds` - used to get the `rctf` bounding box of an fcurve * `BKE_fcurve_calc_range` - used to get only the x-range, potentially faster when not needing y extents `get_fcurve_end_keyframes` has been replaced with `get_bounding_bezt_indices` - dealing with indices allows to iterate over that range later ### BKE_fcurve_calc_bounds * pass in an `rctf` instead of float pointers * extract logic to get bounds into separate functions ### BKE_fcurve_calc_range * removed the parameter `do_min_length` it was always false, and this function shouldn't concern itself with clamping. Calling code can do that if the return bool is false * use function to get x bounds separated from `BKE_fcurve_calc_bounds` Pull Request: blender/blender#105177
55 KiB
55 KiB