diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-13 08:36:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-13 08:46:41 +0300 |
commit | 65965a892fd116267ed94d1c8b59c99589671856 (patch) | |
tree | 7bddd59f2080cbd0e6469c719814b400531f3606 /source/blender/blenkernel/intern/fcurve_test.cc | |
parent | 8335c26119bf5ba78b2afa4e2f65bb3d04b42abe (diff) |
Cleanup: use BKE_fcurve_ prefix for keyframing bezier functions
- BKE_bezt_subdivide_handles -> BKE_fcurve_bezt_subdivide_handles
- binarysearch_bezt_index -> BKE_fcurve_bezt_binarysearch_index
These functions are specific to F-Curves and don't make sense for other
uses of BezTriple (curve-object data for e.g.)
Also:
- Move detailed doxygen comment above code, following code-style.
- Mark bezt_add_to_cfra_elem unused.
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve_test.cc')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve_test.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/fcurve_test.cc b/source/blender/blenkernel/intern/fcurve_test.cc index f258e2ff28d..a230c8f2e96 100644 --- a/source/blender/blenkernel/intern/fcurve_test.cc +++ b/source/blender/blenkernel/intern/fcurve_test.cc @@ -50,8 +50,9 @@ TEST(evaluate_fcurve, OnKeys) EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); /* hits 'on or after last' function */ /* Also test within a specific time epsilon of the keys, as this was an issue in T39207. - * This epsilon is just slightly smaller than the epsilon given to binarysearch_bezt_index_ex() - * in fcurve_eval_between_keyframes(), so it should hit the "exact" code path. */ + * This epsilon is just slightly smaller than the epsilon given to + * BKE_fcurve_bezt_binarysearch_index_ex() in fcurve_eval_between_keyframes(), so it should hit + * the "exact" code path. */ float time_epsilon = 0.00008f; EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f - time_epsilon), 13.0f, EPSILON); EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f + time_epsilon), 13.0f, EPSILON); @@ -210,7 +211,7 @@ TEST(evaluate_fcurve, ExtrapolationBezierKeys) BKE_fcurve_free(fcu); } -TEST(fcurve_subdivide, BKE_bezt_subdivide_handles) +TEST(fcurve_subdivide, BKE_fcurve_bezt_subdivide_handles) { FCurve *fcu = BKE_fcurve_create(); @@ -245,7 +246,7 @@ TEST(fcurve_subdivide, BKE_bezt_subdivide_handles) /* This should update the existing handles as well as the new BezTriple. */ float y_delta; - BKE_bezt_subdivide_handles(&beztr, &fcu->bezt[0], &fcu->bezt[1], &y_delta); + BKE_fcurve_bezt_subdivide_handles(&beztr, &fcu->bezt[0], &fcu->bezt[1], &y_delta); EXPECT_FLOAT_EQ(y_delta, 0.0f); |