Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-13 08:36:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-13 08:46:41 +0300
commit65965a892fd116267ed94d1c8b59c99589671856 (patch)
tree7bddd59f2080cbd0e6469c719814b400531f3606 /source/blender/editors/animation/keyframing.c
parent8335c26119bf5ba78b2afa4e2f65bb3d04b42abe (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/editors/animation/keyframing.c')
-rw-r--r--source/blender/editors/animation/keyframing.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 967ca13c17d..3fb707078b8 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -407,7 +407,7 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
/* are there already keyframes? */
if (fcu->bezt) {
bool replace;
- i = binarysearch_bezt_index(fcu->bezt, bezt->vec[1][0], fcu->totvert, &replace);
+ i = BKE_fcurve_bezt_binarysearch_index(fcu->bezt, bezt->vec[1][0], fcu->totvert, &replace);
/* replace an existing keyframe? */
if (replace) {
@@ -511,7 +511,7 @@ static void subdivide_nonauto_handles(const FCurve *fcu,
/* Subdivide the curve. */
float delta;
- if (!BKE_bezt_subdivide_handles(bezt, prev, next, &delta)) {
+ if (!BKE_fcurve_bezt_subdivide_handles(bezt, prev, next, &delta)) {
return;
}
@@ -1605,7 +1605,7 @@ static bool delete_keyframe_fcurve(AnimData *adt, FCurve *fcu, float cfra)
int i;
/* try to find index of beztriple to get rid of */
- i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found);
+ i = BKE_fcurve_bezt_binarysearch_index(fcu->bezt, cfra, fcu->totvert, &found);
if (found) {
/* delete the key at the index (will sanity check + do recalc afterwards) */
delete_fcurve_key(fcu, i, 1);
@@ -2648,7 +2648,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
int i;
/* try to find index of beztriple to get rid of */
- i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found);
+ i = BKE_fcurve_bezt_binarysearch_index(fcu->bezt, cfra, fcu->totvert, &found);
if (found) {
/* delete the key at the index (will sanity check + do recalc afterwards) */
delete_fcurve_key(fcu, i, 1);
@@ -2822,9 +2822,9 @@ bool fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter)
/* we either include all regardless of muting, or only non-muted */
if ((filter & ANIMFILTER_KEYS_MUTED) || (fcu->flag & FCURVE_MUTED) == 0) {
bool replace;
- int i = binarysearch_bezt_index(fcu->bezt, frame, fcu->totvert, &replace);
+ int i = BKE_fcurve_bezt_binarysearch_index(fcu->bezt, frame, fcu->totvert, &replace);
- /* binarysearch_bezt_index will set replace to be 0 or 1
+ /* BKE_fcurve_bezt_binarysearch_index will set replace to be 0 or 1
* - obviously, 1 represents a match
*/
if (replace) {