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
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')
-rw-r--r--source/blender/editors/animation/keyframing.c12
-rw-r--r--source/blender/editors/armature/pose_slide.c2
-rw-r--r--source/blender/editors/render/render_opengl.c3
3 files changed, 9 insertions, 8 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) {
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index 59e14f85c81..eb2a0d7a073 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -1802,7 +1802,7 @@ static void pose_propagate_fcurve(
* - if only doing selected keyframes, start from the first one
*/
if (mode != POSE_PROPAGATE_SELECTED_KEYS) {
- match = binarysearch_bezt_index(fcu->bezt, startFrame, fcu->totvert, &keyExists);
+ match = BKE_fcurve_bezt_binarysearch_index(fcu->bezt, startFrame, fcu->totvert, &keyExists);
if (fcu->bezt[match].vec[1][0] < startFrame) {
i = match + 1;
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index ed20d2895fc..8d410e36ca6 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -546,7 +546,8 @@ static void gather_frames_to_render_for_adt(const OGLRender *oglrender, const An
}
bool found = false; /* Not interesting, we just want a starting point for the for-loop.*/
- int key_index = binarysearch_bezt_index(fcu->bezt, frame_start, fcu->totvert, &found);
+ int key_index = BKE_fcurve_bezt_binarysearch_index(
+ fcu->bezt, frame_start, fcu->totvert, &found);
for (; key_index < fcu->totvert; key_index++) {
BezTriple *bezt = &fcu->bezt[key_index];
/* The frame range to render uses integer frame numbers, and the frame