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:
authorJeroen Bakker <j.bakker@atmind.nl>2020-06-05 10:30:15 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2020-06-05 10:30:15 +0300
commite8b8e16b24ade2ca0861cb40a8b4e800a3fb0729 (patch)
treee67319705fec014344ddff39fc6a92c1cc85b5bc /source/blender
parentfe6be70875bca64e555d1cbedf1c2160493cf0e2 (diff)
Code Cleanup: fcurve function naming
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h69
-rw-r--r--source/blender/blenkernel/intern/action.c6
-rw-r--r--source/blender/blenkernel/intern/anim_data.c8
-rw-r--r--source/blender/blenkernel/intern/fcurve.c85
-rw-r--r--source/blender/blenkernel/intern/ipo.c4
-rw-r--r--source/blender/blenkernel/intern/nla.c8
-rw-r--r--source/blender/blenkernel/intern/object.c4
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenkernel/intern/sequencer.c4
-rw-r--r--source/blender/blenloader/intern/versioning_280.c2
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c6
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/animation/drivers.c15
-rw-r--r--source/blender/editors/animation/keyframing.c15
-rw-r--r--source/blender/editors/armature/armature_add.c4
-rw-r--r--source/blender/editors/curve/editcurve.c12
-rw-r--r--source/blender/editors/curve/editcurve_undo.c16
-rw-r--r--source/blender/editors/interface/interface_anim.c2
-rw-r--r--source/blender/editors/object/object_constraint.c2
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/space_action/action_edit.c2
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c2
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_graph/graph_edit.c9
-rw-r--r--source/blender/editors/space_graph/graph_utils.c4
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c2
-rw-r--r--source/blender/io/collada/AnimationImporter.cpp4
-rw-r--r--source/blender/io/collada/BCAnimationCurve.cpp2
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_action.c6
-rw-r--r--source/blender/makesrna/intern/rna_animation.c8
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c2
-rw-r--r--source/blender/makesrna/intern/rna_nla.c2
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c8
36 files changed, 162 insertions, 165 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index b310d66d4bd..c3a597e29b9 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -180,18 +180,18 @@ int BKE_fcm_envelope_find_index(struct FCM_EnvelopeData *array,
/* -------- Data Management -------- */
struct FCurve *BKE_fcurve_create(void);
-void free_fcurve(struct FCurve *fcu);
-struct FCurve *copy_fcurve(const struct FCurve *fcu);
+void BKE_fcurve_free(struct FCurve *fcu);
+struct FCurve *BKE_fcurve_copy(const struct FCurve *fcu);
-void free_fcurves(ListBase *list);
-void copy_fcurves(ListBase *dst, ListBase *src);
+void BKE_fcurves_free(ListBase *list);
+void BKE_fcurves_copy(ListBase *dst, ListBase *src);
void BKE_fcurve_foreach_id(struct FCurve *fcu, struct LibraryForeachIDData *data);
/* find matching F-Curve in the given list of F-Curves */
-struct FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index);
+struct FCurve *BKE_fcurve_find(ListBase *list, const char rna_path[], const int array_index);
-struct FCurve *iter_step_fcurve(struct FCurve *fcu_iter, const char rna_path[]);
+struct FCurve *BKE_fcurve_iter_step(struct FCurve *fcu_iter, const char rna_path[]);
/* high level function to get an fcurve from C without having the rna */
struct FCurve *id_data_find_fcurve(
@@ -199,31 +199,28 @@ struct FCurve *id_data_find_fcurve(
/* Get list of LinkData's containing pointers to the F-Curves which control the types of data
* indicated
- * e.g. numMatches = list_find_data_fcurves(matches, &act->curves, "pose.bones[", "MyFancyBone");
+ * e.g. numMatches = BKE_fcurves_filter(matches, &act->curves, "pose.bones[", "MyFancyBone");
*/
-int list_find_data_fcurves(ListBase *dst,
- ListBase *src,
- const char *dataPrefix,
- const char *dataName);
+int BKE_fcurves_filter(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName);
/* Find an f-curve based on an rna property. */
-struct FCurve *rna_get_fcurve(struct PointerRNA *ptr,
- struct PropertyRNA *prop,
- int rnaindex,
- struct AnimData **r_adt,
- struct bAction **r_action,
- bool *r_driven,
- bool *r_special);
+struct FCurve *BKE_fcurve_find_by_rna(struct PointerRNA *ptr,
+ struct PropertyRNA *prop,
+ int rnaindex,
+ struct AnimData **r_adt,
+ struct bAction **r_action,
+ bool *r_driven,
+ bool *r_special);
/* Same as above, but takes a context data,
* temp hack needed for complex paths like texture ones. */
-struct FCurve *rna_get_fcurve_context_ui(struct bContext *C,
- struct PointerRNA *ptr,
- struct PropertyRNA *prop,
- int rnaindex,
- struct AnimData **r_animdata,
- struct bAction **r_action,
- bool *r_driven,
- bool *r_special);
+struct FCurve *BKE_fcurve_find_by_rna_context_ui(struct bContext *C,
+ struct PointerRNA *ptr,
+ struct PropertyRNA *prop,
+ int rnaindex,
+ struct AnimData **r_animdata,
+ struct bAction **r_action,
+ bool *r_driven,
+ bool *r_special);
/* Binary search algorithm for finding where to 'insert' BezTriple with given frame number.
* Returns the index to insert at (data already at that index will be offset if replace is 0)
@@ -231,25 +228,25 @@ struct FCurve *rna_get_fcurve_context_ui(struct bContext *C,
int binarysearch_bezt_index(struct BezTriple array[], float frame, int arraylen, bool *r_replace);
/* get the time extents for F-Curve */
-bool calc_fcurve_range(
+bool BKE_fcurve_calc_range(
struct FCurve *fcu, float *min, float *max, const bool do_sel_only, const bool do_min_length);
/* get the bounding-box extents for F-Curve */
-bool calc_fcurve_bounds(struct FCurve *fcu,
- float *xmin,
- float *xmax,
- float *ymin,
- float *ymax,
- const bool do_sel_only,
- const bool include_handles);
+bool BKE_fcurve_calc_bounds(struct FCurve *fcu,
+ float *xmin,
+ float *xmax,
+ float *ymin,
+ float *ymax,
+ const bool do_sel_only,
+ const bool include_handles);
/* .............. */
/* Are keyframes on F-Curve of any use (to final result, and to show in editors)? */
-bool fcurve_are_keyframes_usable(struct FCurve *fcu);
+bool BKE_fcurve_are_keyframes_usable(struct FCurve *fcu);
/* Can keyframes be added to F-Curve? */
-bool fcurve_is_keyframable(struct FCurve *fcu);
+bool BKE_fcurve_is_keyframable(struct FCurve *fcu);
bool BKE_fcurve_is_protected(struct FCurve *fcu);
/* The curve is an infinite cycle via Cycles modifier */
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index ca58b69689c..c776f0d077d 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -116,7 +116,7 @@ static void action_copy_data(Main *UNUSED(bmain),
/* XXX TODO pass subdata flag?
* But surprisingly does not seem to be doing any ID refcounting... */
- fcurve_dst = copy_fcurve(fcurve_src);
+ fcurve_dst = BKE_fcurve_copy(fcurve_src);
BLI_addtail(&action_dst->curves, fcurve_dst);
@@ -146,7 +146,7 @@ static void action_free_data(struct ID *id)
/* No animdata here. */
/* Free F-Curves. */
- free_fcurves(&action->curves);
+ BKE_fcurves_free(&action->curves);
/* Free groups. */
BLI_freelistN(&action->groups);
@@ -1310,7 +1310,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
* single-keyframe curves will increase the overall length by
* a phantom frame (T50354)
*/
- calc_fcurve_range(fcu, &nmin, &nmax, false, false);
+ BKE_fcurve_calc_range(fcu, &nmin, &nmax, false, false);
/* compare to the running tally */
min = min_ff(min, nmin);
diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c
index 726753a4e70..9ab4e5c028d 100644
--- a/source/blender/blenkernel/intern/anim_data.c
+++ b/source/blender/blenkernel/intern/anim_data.c
@@ -256,7 +256,7 @@ void BKE_animdata_free(ID *id, const bool do_id_user)
BKE_nla_tracks_free(&adt->nla_tracks, do_id_user);
/* free drivers - stored as a list of F-Curves */
- free_fcurves(&adt->drivers);
+ BKE_fcurves_free(&adt->drivers);
/* free driver array cache */
MEM_SAFE_FREE(adt->driver_array);
@@ -345,7 +345,7 @@ AnimData *BKE_animdata_copy(Main *bmain, AnimData *adt, const int flag)
BKE_nla_tracks_copy(bmain, &dadt->nla_tracks, &adt->nla_tracks, flag);
/* duplicate drivers (F-Curves) */
- copy_fcurves(&dadt->drivers, &adt->drivers);
+ BKE_fcurves_copy(&dadt->drivers, &adt->drivers);
dadt->driver_array = NULL;
/* don't copy overrides */
@@ -447,7 +447,7 @@ void BKE_animdata_merge_copy(
if (src->drivers.first) {
ListBase drivers = {NULL, NULL};
- copy_fcurves(&drivers, &src->drivers);
+ BKE_fcurves_copy(&drivers, &src->drivers);
/* Fix up all driver targets using the old target id
* - This assumes that the src ID is being merged into the dst ID
@@ -1101,7 +1101,7 @@ static bool fcurves_path_remove_fix(const char *prefix, ListBase *curves)
if (fcu->rna_path) {
if (STRPREFIX(fcu->rna_path, prefix)) {
BLI_remlink(curves, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
any_removed = true;
}
}
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 5eb1b756ac7..d4754615c7f 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -66,7 +66,7 @@ FCurve *BKE_fcurve_create(void)
/* ---------------------- Freeing --------------------------- */
/* Frees the F-Curve itself too, so make sure BLI_remlink is called before calling this... */
-void free_fcurve(FCurve *fcu)
+void BKE_fcurve_free(FCurve *fcu)
{
if (fcu == NULL) {
return;
@@ -88,7 +88,7 @@ void free_fcurve(FCurve *fcu)
}
/* Frees a list of F-Curves */
-void free_fcurves(ListBase *list)
+void BKE_fcurves_free(ListBase *list)
{
FCurve *fcu, *fcn;
@@ -103,7 +103,7 @@ void free_fcurves(ListBase *list)
*/
for (fcu = list->first; fcu; fcu = fcn) {
fcn = fcu->next;
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
}
/* clear pointers just in case */
@@ -113,7 +113,7 @@ void free_fcurves(ListBase *list)
/* ---------------------- Copy --------------------------- */
/* duplicate an F-Curve */
-FCurve *copy_fcurve(const FCurve *fcu)
+FCurve *BKE_fcurve_copy(const FCurve *fcu)
{
FCurve *fcu_d;
@@ -146,7 +146,7 @@ FCurve *copy_fcurve(const FCurve *fcu)
}
/* duplicate a list of F-Curves */
-void copy_fcurves(ListBase *dst, ListBase *src)
+void BKE_fcurves_copy(ListBase *dst, ListBase *src)
{
FCurve *dfcu, *sfcu;
@@ -160,7 +160,7 @@ void copy_fcurves(ListBase *dst, ListBase *src)
/* copy one-by-one */
for (sfcu = src->first; sfcu; sfcu = sfcu->next) {
- dfcu = copy_fcurve(sfcu);
+ dfcu = BKE_fcurve_copy(sfcu);
BLI_addtail(dst, dfcu);
}
}
@@ -234,12 +234,12 @@ FCurve *id_data_find_fcurve(
/* animation takes priority over drivers */
if (adt->action && adt->action->curves.first) {
- fcu = list_find_fcurve(&adt->action->curves, path, index);
+ fcu = BKE_fcurve_find(&adt->action->curves, path, index);
}
/* if not animated, check if driven */
if (fcu == NULL && adt->drivers.first) {
- fcu = list_find_fcurve(&adt->drivers, path, index);
+ fcu = BKE_fcurve_find(&adt->drivers, path, index);
if (fcu && r_driven) {
*r_driven = true;
}
@@ -253,7 +253,7 @@ FCurve *id_data_find_fcurve(
/* Find the F-Curve affecting the given RNA-access path + index,
* in the list of F-Curves provided. */
-FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index)
+FCurve *BKE_fcurve_find(ListBase *list, const char rna_path[], const int array_index)
{
FCurve *fcu;
@@ -278,7 +278,7 @@ FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_
}
/* quick way to loop over all fcurves of a given 'path' */
-FCurve *iter_step_fcurve(FCurve *fcu_iter, const char rna_path[])
+FCurve *BKE_fcurve_iter_step(FCurve *fcu_iter, const char rna_path[])
{
FCurve *fcu;
@@ -311,10 +311,7 @@ FCurve *iter_step_fcurve(FCurve *fcu_iter, const char rna_path[])
* - dataPrefix: i.e. 'pose.bones[' or 'nodes['
* - dataName: name of entity within "" immediately following the prefix
*/
-int list_find_data_fcurves(ListBase *dst,
- ListBase *src,
- const char *dataPrefix,
- const char *dataName)
+int BKE_fcurves_filter(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
{
FCurve *fcu;
int matches = 0;
@@ -356,26 +353,26 @@ int list_find_data_fcurves(ListBase *dst,
return matches;
}
-FCurve *rna_get_fcurve(PointerRNA *ptr,
- PropertyRNA *prop,
- int rnaindex,
- AnimData **r_adt,
- bAction **r_action,
- bool *r_driven,
- bool *r_special)
+FCurve *BKE_fcurve_find_by_rna(PointerRNA *ptr,
+ PropertyRNA *prop,
+ int rnaindex,
+ AnimData **r_adt,
+ bAction **r_action,
+ bool *r_driven,
+ bool *r_special)
{
- return rna_get_fcurve_context_ui(
+ return BKE_fcurve_find_by_rna_context_ui(
NULL, ptr, prop, rnaindex, r_adt, r_action, r_driven, r_special);
}
-FCurve *rna_get_fcurve_context_ui(bContext *C,
- PointerRNA *ptr,
- PropertyRNA *prop,
- int rnaindex,
- AnimData **r_animdata,
- bAction **r_action,
- bool *r_driven,
- bool *r_special)
+FCurve *BKE_fcurve_find_by_rna_context_ui(bContext *C,
+ PointerRNA *ptr,
+ PropertyRNA *prop,
+ int rnaindex,
+ AnimData **r_animdata,
+ bAction **r_action,
+ bool *r_driven,
+ bool *r_special)
{
FCurve *fcu = NULL;
PointerRNA tptr = *ptr;
@@ -400,7 +397,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C,
*r_special = true;
/* The F-Curve either exists or it doesn't here... */
- fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), rnaindex);
+ fcu = BKE_fcurve_find(&strip->fcurves, RNA_property_identifier(prop), rnaindex);
return fcu;
}
@@ -436,7 +433,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C,
// XXX: the logic here is duplicated with a function up above
/* animation takes priority over drivers */
if (adt->action && adt->action->curves.first) {
- fcu = list_find_fcurve(&adt->action->curves, path, rnaindex);
+ fcu = BKE_fcurve_find(&adt->action->curves, path, rnaindex);
if (fcu && r_action) {
*r_action = adt->action;
@@ -445,7 +442,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C,
/* if not animated, check if driven */
if (!fcu && (adt->drivers.first)) {
- fcu = list_find_fcurve(&adt->drivers, path, rnaindex);
+ fcu = BKE_fcurve_find(&adt->drivers, path, rnaindex);
if (fcu) {
if (r_animdata) {
@@ -635,13 +632,13 @@ static short get_fcurve_end_keyframes(FCurve *fcu,
}
/* Calculate the extents of F-Curve's data */
-bool calc_fcurve_bounds(FCurve *fcu,
- float *xmin,
- float *xmax,
- float *ymin,
- float *ymax,
- const bool do_sel_only,
- const bool include_handles)
+bool BKE_fcurve_calc_bounds(FCurve *fcu,
+ float *xmin,
+ float *xmax,
+ float *ymin,
+ float *ymax,
+ const bool do_sel_only,
+ const bool include_handles)
{
float xminv = 999999999.0f, xmaxv = -999999999.0f;
float yminv = 999999999.0f, ymaxv = -999999999.0f;
@@ -765,7 +762,7 @@ bool calc_fcurve_bounds(FCurve *fcu,
}
/* Calculate the extents of F-Curve's keyframes */
-bool calc_fcurve_range(
+bool BKE_fcurve_calc_range(
FCurve *fcu, float *start, float *end, const bool do_sel_only, const bool do_min_length)
{
float min = 999999999.0f, max = -999999999.0f;
@@ -818,7 +815,7 @@ bool calc_fcurve_range(
* Usability of keyframes refers to whether they should be displayed,
* and also whether they will have any influence on the final result.
*/
-bool fcurve_are_keyframes_usable(FCurve *fcu)
+bool BKE_fcurve_are_keyframes_usable(FCurve *fcu)
{
/* F-Curve must exist */
if (fcu == NULL) {
@@ -886,10 +883,10 @@ bool BKE_fcurve_is_protected(FCurve *fcu)
/* Can keyframes be added to F-Curve?
* Keyframes can only be added if they are already visible
*/
-bool fcurve_is_keyframable(FCurve *fcu)
+bool BKE_fcurve_is_keyframable(FCurve *fcu)
{
/* F-Curve's keyframes must be "usable" (i.e. visible + have an effect on final result) */
- if (fcurve_are_keyframes_usable(fcu) == 0) {
+ if (BKE_fcurve_are_keyframes_usable(fcu) == 0) {
return false;
}
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index a2dfbefdb2c..7bf9cb2d0a1 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -1420,7 +1420,7 @@ static void icu_to_fcurves(ID *id,
/* make a copy of existing base-data if not the last curve */
if (b < (totbits - 1)) {
- fcurve = copy_fcurve(fcu);
+ fcurve = BKE_fcurve_copy(fcu);
}
else {
fcurve = fcu;
@@ -2396,7 +2396,7 @@ void do_versions_ipos_to_animato(Main *bmain)
}
/* free unused drivers from actions + ipos */
- free_fcurves(&drivers);
+ BKE_fcurves_free(&drivers);
if (G.debug & G_DEBUG) {
printf("INFO: Animato convert done\n");
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 97b09d10ede..7012688686b 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -92,7 +92,7 @@ void BKE_nlastrip_free(ListBase *strips, NlaStrip *strip, bool do_id_user)
// BKE_animremap_free();
/* free own F-Curves */
- free_fcurves(&strip->fcurves);
+ BKE_fcurves_free(&strip->fcurves);
/* free own F-Modifiers */
free_fmodifiers(&strip->modifiers);
@@ -198,7 +198,7 @@ NlaStrip *BKE_nlastrip_copy(Main *bmain,
}
/* copy F-Curves and modifiers */
- copy_fcurves(&strip_d->fcurves, &strip->fcurves);
+ BKE_fcurves_copy(&strip_d->fcurves, &strip->fcurves);
copy_fmodifiers(&strip_d->modifiers, &strip->modifiers);
/* make a copy of all the child-strips, one at a time */
@@ -1494,7 +1494,7 @@ void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
/* if controlling influence... */
if (strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) {
/* try to get F-Curve */
- fcu = list_find_fcurve(&strip->fcurves, "influence", 0);
+ fcu = BKE_fcurve_find(&strip->fcurves, "influence", 0);
/* add one if not found */
if (fcu == NULL) {
@@ -1525,7 +1525,7 @@ void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
/* if controlling time... */
if (strip->flag & NLASTRIP_FLAG_USR_TIME) {
/* try to get F-Curve */
- fcu = list_find_fcurve(&strip->fcurves, "strip_time", 0);
+ fcu = BKE_fcurve_find(&strip->fcurves, "strip_time", 0);
/* add one if not found */
if (fcu == NULL) {
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 3e2629f8272..e7a8d04e0b8 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2087,8 +2087,8 @@ void BKE_object_copy_proxy_drivers(Object *ob, Object *target)
}
/* make a copy of all the drivers (for now), then correct any links that need fixing */
- free_fcurves(&ob->adt->drivers);
- copy_fcurves(&ob->adt->drivers, &target->adt->drivers);
+ BKE_fcurves_free(&ob->adt->drivers);
+ BKE_fcurves_copy(&ob->adt->drivers, &target->adt->drivers);
for (fcu = ob->adt->drivers.first; fcu; fcu = fcu->next) {
ChannelDriver *driver = fcu->driver;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 7447971e7c5..aa2a1b14841 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -621,7 +621,7 @@ static void remove_sequencer_fcurves(Scene *sce)
if ((fcu->rna_path) && strstr(fcu->rna_path, "sequences_all")) {
action_groups_remove_channel(adt->action, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
}
}
}
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 954dca0f679..90edebfaa97 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -5119,7 +5119,7 @@ void BKE_sequencer_dupe_animdata(Scene *scene, const char *name_src, const char
for (fcu = scene->adt->action->curves.first; fcu && fcu->prev != fcu_last; fcu = fcu->next) {
if (STREQLEN(fcu->rna_path, str_from, str_from_len)) {
- fcu_cpy = copy_fcurve(fcu);
+ fcu_cpy = BKE_fcurve_copy(fcu);
BLI_addtail(&lb, fcu_cpy);
}
}
@@ -5152,7 +5152,7 @@ static void seq_free_animdata(Scene *scene, Sequence *seq)
FCurve *next_fcu = fcu->next;
BLI_remlink(&scene->adt->action->curves, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
fcu = next_fcu;
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 96e8981a944..6211c58d7d4 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -759,7 +759,7 @@ static void do_version_bbone_scale_fcurve_fix(ListBase *curves, FCurve *fcu)
/* Update F-Curve's path. */
if (replace_bbone_scale_rnapath(&fcu->rna_path)) {
/* If matched, duplicate the curve and tweak name. */
- FCurve *second = copy_fcurve(fcu);
+ FCurve *second = BKE_fcurve_copy(fcu);
second->rna_path[strlen(second->rna_path) - 1] = 'y';
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index a7ca84eb6c6..1ca3452e8d8 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -671,7 +671,7 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f
}
/* free the F-Curve itself */
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
}
/* If the action has no F-Curves, unlink it from AnimData if it did not
@@ -1806,7 +1806,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
/* remove from group and action, then free */
action_groups_remove_channel(adt->action, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
}
/* free the group itself */
@@ -1860,7 +1860,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
/* unlink and free the F-Curve */
BLI_remlink(&strip->fcurves, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
tag_update_animation_element(ale);
break;
}
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 2b9dfe105bc..bd83bdae31b 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -988,7 +988,7 @@ static bAnimListElem *make_new_animlistelem(void *data,
* then free the MEM_alloc'd string
*/
if (rna_path) {
- ale->key_data = (void *)list_find_fcurve(&act->curves, rna_path, 0);
+ ale->key_data = (void *)BKE_fcurve_find(&act->curves, rna_path, 0);
MEM_freeN(rna_path);
}
}
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index f7416ce7566..328e435877c 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -92,7 +92,7 @@ FCurve *verify_driver_fcurve(ID *id,
* - add if not found and allowed to add one
* TODO: add auto-grouping support? how this works will need to be resolved
*/
- fcu = list_find_fcurve(&adt->drivers, rna_path, array_index);
+ fcu = BKE_fcurve_find(&adt->drivers, rna_path, array_index);
if (fcu == NULL && creation_mode != DRIVER_FCURVE_LOOKUP_ONLY) {
/* use default settings to make a F-Curve */
@@ -570,13 +570,13 @@ bool ANIM_remove_driver(ReportList *UNUSED(reports),
/* step through all drivers, removing all of those with the same base path */
FCurve *fcu_iter = adt->drivers.first;
- while ((fcu = iter_step_fcurve(fcu_iter, rna_path)) != NULL) {
+ while ((fcu = BKE_fcurve_iter_step(fcu_iter, rna_path)) != NULL) {
/* store the next fcurve for looping */
fcu_iter = fcu->next;
/* remove F-Curve from driver stack, then free it */
BLI_remlink(&adt->drivers, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
/* done successfully */
success = true;
@@ -590,7 +590,7 @@ bool ANIM_remove_driver(ReportList *UNUSED(reports),
fcu = verify_driver_fcurve(id, rna_path, array_index, DRIVER_FCURVE_LOOKUP_ONLY);
if (fcu) {
BLI_remlink(&adt->drivers, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
success = true;
}
@@ -611,7 +611,7 @@ void ANIM_drivers_copybuf_free(void)
{
/* free the buffer F-Curve if it exists, as if it were just another F-Curve */
if (channeldriver_copypaste_buf) {
- free_fcurve(channeldriver_copypaste_buf);
+ BKE_fcurve_free(channeldriver_copypaste_buf);
}
channeldriver_copypaste_buf = NULL;
}
@@ -662,7 +662,7 @@ bool ANIM_copy_driver(
fcu->rna_path = NULL;
/* make a copy of the F-Curve with */
- channeldriver_copypaste_buf = copy_fcurve(fcu);
+ channeldriver_copypaste_buf = BKE_fcurve_copy(fcu);
/* restore the path */
fcu->rna_path = tmp_path;
@@ -981,7 +981,8 @@ static bool add_driver_button_poll(bContext *C)
}
/* Don't do anything if there is an fcurve for animation without a driver. */
- FCurve *fcu = rna_get_fcurve_context_ui(C, &ptr, prop, index, NULL, NULL, &driven, &special);
+ FCurve *fcu = BKE_fcurve_find_by_rna_context_ui(
+ C, &ptr, prop, index, NULL, NULL, &driven, &special);
return (fcu == NULL || fcu->driver);
}
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index b3b818fafa9..2aa8d468e2d 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -184,7 +184,7 @@ FCurve *ED_action_fcurve_find(struct bAction *act, const char rna_path[], const
if (ELEM(NULL, act, rna_path)) {
return NULL;
}
- return list_find_fcurve(&act->curves, rna_path, array_index);
+ return BKE_fcurve_find(&act->curves, rna_path, array_index);
}
/**
@@ -210,7 +210,7 @@ FCurve *ED_action_fcurve_ensure(struct Main *bmain,
* - add if not found and allowed to add one
* TODO: add auto-grouping support? how this works will need to be resolved
*/
- fcu = list_find_fcurve(&act->curves, rna_path, array_index);
+ fcu = BKE_fcurve_find(&act->curves, rna_path, array_index);
if (fcu == NULL) {
/* use default settings to make a F-Curve */
@@ -1120,7 +1120,7 @@ static bool insert_keyframe_value(ReportList *reports,
eInsertKeyFlags flag)
{
/* F-Curve not editable? */
- if (fcurve_is_keyframable(fcu) == 0) {
+ if (BKE_fcurve_is_keyframable(fcu) == 0) {
BKE_reportf(
reports,
RPT_ERROR,
@@ -2400,7 +2400,7 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
* not have any effect.
*/
NlaStrip *strip = ptr.data;
- FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
+ FCurve *fcu = BKE_fcurve_find(&strip->fcurves, RNA_property_identifier(prop), index);
if (fcu) {
changed = insert_keyframe_direct(
@@ -2417,7 +2417,7 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
FCurve *fcu;
bool driven, special;
- fcu = rna_get_fcurve_context_ui(C, &ptr, prop, index, NULL, NULL, &driven, &special);
+ fcu = BKE_fcurve_find_by_rna_context_ui(C, &ptr, prop, index, NULL, NULL, &driven, &special);
if (fcu && driven) {
changed = insert_keyframe_direct(
@@ -2560,7 +2560,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
*/
ID *id = ptr.owner_id;
NlaStrip *strip = ptr.data;
- FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), 0);
+ FCurve *fcu = BKE_fcurve_find(&strip->fcurves, RNA_property_identifier(prop), 0);
if (fcu) {
if (BKE_fcurve_is_protected(fcu)) {
@@ -3001,7 +3001,8 @@ bool ED_autokeyframe_property(
bool special;
bool changed = false;
- fcu = rna_get_fcurve_context_ui(C, ptr, prop, rnaindex, NULL, &action, &driven, &special);
+ fcu = BKE_fcurve_find_by_rna_context_ui(
+ C, ptr, prop, rnaindex, NULL, &action, &driven, &special);
if (fcu == NULL) {
return changed;
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index d941f8ce95f..895b4953992 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -516,11 +516,11 @@ static void updateDuplicateActionConstraintSettings(EditBone *dup_bone,
/* See if there is any channels that uses this bone */
ListBase ani_curves;
BLI_listbase_clear(&ani_curves);
- if (list_find_data_fcurves(&ani_curves, &act->curves, "pose.bones[", orig_bone->name)) {
+ if (BKE_fcurves_filter(&ani_curves, &act->curves, "pose.bones[", orig_bone->name)) {
/* Create a copy and mirror the animation */
for (LinkData *ld = ani_curves.first; ld; ld = ld->next) {
FCurve *old_curve = ld->data;
- FCurve *new_curve = copy_fcurve(old_curve);
+ FCurve *new_curve = BKE_fcurve_copy(old_curve);
bActionGroup *agrp;
char *old_path = new_curve->rna_path;
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 4d783396888..4e1c07af001 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -936,13 +936,13 @@ static void fcurve_path_rename(AnimData *adt,
nextfcu = fcu->next;
if (STREQLEN(fcu->rna_path, orig_rna_path, len)) {
char *spath, *suffix = fcu->rna_path + len;
- nfcu = copy_fcurve(fcu);
+ nfcu = BKE_fcurve_copy(fcu);
spath = nfcu->rna_path;
nfcu->rna_path = BLI_sprintfN("%s%s", rna_path, suffix);
- /* copy_fcurve() sets nfcu->grp to NULL. To maintain the groups, we need to keep the pointer.
- * As a result, the group's 'channels' pointers will be wrong, which is fixed by calling
- * `action_groups_reconstruct(action)` later, after all fcurves have been renamed. */
+ /* BKE_fcurve_copy() sets nfcu->grp to NULL. To maintain the groups, we need to keep the
+ * pointer. As a result, the group's 'channels' pointers will be wrong, which is fixed by
+ * calling `action_groups_reconstruct(action)` later, after all fcurves have been renamed. */
nfcu->grp = fcu->grp;
BLI_addtail(curves, nfcu);
@@ -956,7 +956,7 @@ static void fcurve_path_rename(AnimData *adt,
BLI_remlink(&adt->drivers, fcu);
}
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
MEM_freeN(spath);
}
@@ -972,7 +972,7 @@ static void fcurve_remove(AnimData *adt, ListBase *orig_curves, FCurve *fcu)
action_groups_remove_channel(adt->action, fcu);
}
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
}
static void curve_rename_fcurves(Curve *cu, ListBase *orig_curves)
diff --git a/source/blender/editors/curve/editcurve_undo.c b/source/blender/editors/curve/editcurve_undo.c
index af492de638b..1fd1e217649 100644
--- a/source/blender/editors/curve/editcurve_undo.c
+++ b/source/blender/editors/curve/editcurve_undo.c
@@ -88,12 +88,12 @@ static void undocurve_to_editcurve(Main *bmain, UndoCurve *ucu, Curve *cu, short
if (ad) {
if (ad->action) {
- free_fcurves(&ad->action->curves);
- copy_fcurves(&ad->action->curves, &ucu->fcurves);
+ BKE_fcurves_free(&ad->action->curves);
+ BKE_fcurves_copy(&ad->action->curves, &ucu->fcurves);
}
- free_fcurves(&ad->drivers);
- copy_fcurves(&ad->drivers, &ucu->drivers);
+ BKE_fcurves_free(&ad->drivers);
+ BKE_fcurves_copy(&ad->drivers, &ucu->drivers);
}
/* copy */
@@ -132,10 +132,10 @@ static void undocurve_from_editcurve(UndoCurve *ucu, Curve *cu, const short shap
if (ad) {
if (ad->action) {
- copy_fcurves(&ucu->fcurves, &ad->action->curves);
+ BKE_fcurves_copy(&ucu->fcurves, &ad->action->curves);
}
- copy_fcurves(&ucu->drivers, &ad->drivers);
+ BKE_fcurves_copy(&ucu->drivers, &ad->drivers);
}
/* copy */
@@ -167,8 +167,8 @@ static void undocurve_free_data(UndoCurve *uc)
BKE_curve_editNurb_keyIndex_free(&uc->undoIndex);
- free_fcurves(&uc->fcurves);
- free_fcurves(&uc->drivers);
+ BKE_fcurves_free(&uc->fcurves);
+ BKE_fcurves_free(&uc->drivers);
}
static Object *editcurve_object_from_context(bContext *C)
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 8c9768f523d..5bf2147aff5 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -61,7 +61,7 @@ static FCurve *ui_but_get_fcurve(
* but works well enough in typical cases */
int rnaindex = (but->rnaindex == -1) ? 0 : but->rnaindex;
- return rna_get_fcurve_context_ui(
+ return BKE_fcurve_find_by_rna_context_ui(
but->block->evil_C, &but->rnapoin, but->rnaprop, rnaindex, adt, action, r_driven, r_special);
}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index ba641fb2a39..236b040fca3 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1061,7 +1061,7 @@ static int followpath_path_animate_exec(bContext *C, wmOperator *op)
Curve *cu = (Curve *)data->tar->data;
if (ELEM(NULL, cu->adt, cu->adt->action) ||
- (list_find_fcurve(&cu->adt->action->curves, "eval_time", 0) == NULL)) {
+ (BKE_fcurve_find(&cu->adt->action->curves, "eval_time", 0) == NULL)) {
/* create F-Curve for path animation */
act = ED_id_action_ensure(bmain, &cu->id);
fcu = ED_action_fcurve_ensure(bmain, act, NULL, NULL, "eval_time", 0);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index f2bfcb7a395..b2243f2ccb9 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4952,7 +4952,7 @@ static int drivers_editor_show_exec(bContext *C, wmOperator *op)
FCurve *fcu;
bool driven, special;
- fcu = rna_get_fcurve_context_ui(C, &ptr, prop, index, NULL, NULL, &driven, &special);
+ fcu = BKE_fcurve_find_by_rna_context_ui(C, &ptr, prop, index, NULL, NULL, &driven, &special);
if (fcu) {
/* Isolate this F-Curve... */
bAnimContext ac;
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 576b52a5cdd..b390e4b56d6 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -218,7 +218,7 @@ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const
float tmin, tmax;
/* get range and apply necessary scaling before processing */
- if (calc_fcurve_range(fcu, &tmin, &tmax, onlySel, false)) {
+ if (BKE_fcurve_calc_range(fcu, &tmin, &tmax, onlySel, false)) {
if (adt) {
tmin = BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP);
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 185bf029f1a..179d73a38ba 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -1284,7 +1284,7 @@ static void graph_panel_drivers_popover(const bContext *C, Panel *panel)
FCurve *fcu;
bool driven, special;
- fcu = rna_get_fcurve_context_ui(
+ fcu = BKE_fcurve_find_by_rna_context_ui(
(bContext *)C, &ptr, prop, index, NULL, NULL, &driven, &special);
/* Hack: Force all buttons in this panel to be able to know the driver button
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 68fef5e921f..f2071d292ca 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -1159,7 +1159,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, shor
* we must obey this.
*/
if (!(sipo->flag & SIPO_SELCUVERTSONLY) || (fcu->flag & FCURVE_SELECTED)) {
- if (!fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) {
+ if (!BKE_fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) {
/* only draw controls if this is the active modifier */
if ((fcu->flag & FCURVE_ACTIVE) && (fcm)) {
switch (fcm->type) {
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 06da4416f04..03151da8d4d 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -126,7 +126,8 @@ void get_graph_keyframe_extents(bAnimContext *ac,
float unitFac, offset;
/* get range */
- if (calc_fcurve_bounds(fcu, &txmin, &txmax, &tymin, &tymax, do_sel_only, include_handles)) {
+ if (BKE_fcurve_calc_bounds(
+ fcu, &txmin, &txmax, &tymin, &tymax, do_sel_only, include_handles)) {
short mapping_flag = ANIM_get_normalization_flags(ac);
/* apply NLA scaling */
@@ -409,7 +410,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end)
int filter;
/* free existing ghost curves */
- free_fcurves(&sipo->runtime.ghost_curves);
+ BKE_fcurves_free(&sipo->runtime.ghost_curves);
/* sanity check */
if (start >= end) {
@@ -536,7 +537,7 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
}
/* free ghost curves */
- free_fcurves(&sipo->runtime.ghost_curves);
+ BKE_fcurves_free(&sipo->runtime.ghost_curves);
/* update this editor only */
ED_area_tag_redraw(CTX_wm_area(C));
@@ -806,7 +807,7 @@ static int graphkeys_click_insert_exec(bContext *C, wmOperator *op)
/* when there are F-Modifiers on the curve, only allow adding
* keyframes if these will be visible after doing so...
*/
- if (fcurve_is_keyframable(fcu)) {
+ if (BKE_fcurve_is_keyframable(fcu)) {
ListBase anim_data;
ToolSettings *ts = ac.scene->toolsettings;
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index 575cba07f04..03ed8870d67 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -171,7 +171,7 @@ bool graphop_visible_keyframes_poll(bContext *C)
if (fcu->bezt == NULL) {
continue;
}
- if (fcurve_are_keyframes_usable(fcu)) {
+ if (BKE_fcurve_are_keyframes_usable(fcu)) {
found = 1;
break;
}
@@ -225,7 +225,7 @@ bool graphop_editable_keyframes_poll(bContext *C)
if (fcu->bezt == NULL) {
continue;
}
- if (fcurve_is_keyframable(fcu)) {
+ if (BKE_fcurve_is_keyframable(fcu)) {
found = 1;
break;
}
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index bd82b8ecf2e..b9c7c529620 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -145,7 +145,7 @@ static void graph_free(SpaceLink *sl)
}
if (si->runtime.ghost_curves.first) {
- free_fcurves(&si->runtime.ghost_curves);
+ BKE_fcurves_free(&si->runtime.ghost_curves);
}
}
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 5c4ccd96534..a56b7f8422e 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -325,7 +325,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uin
/* influence -------------------------- */
if (strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) {
- FCurve *fcu = list_find_fcurve(&strip->fcurves, "influence", 0);
+ FCurve *fcu = BKE_fcurve_find(&strip->fcurves, "influence", 0);
float cfra;
/* plot the curve (over the strip's main region) */
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 6b65167a921..80a63af3f42 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -931,7 +931,7 @@ static void cleardrivers_animdata_cb(int UNUSED(event),
IdAdtTemplate *iat = (IdAdtTemplate *)tselem->id;
/* just free drivers - stored as a list of F-Curves */
- free_fcurves(&iat->adt->drivers);
+ BKE_fcurves_free(&iat->adt->drivers);
DEG_id_tag_update(tselem->id, ID_RECALC_ANIMATION);
}
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp
index 0e5fa5ec161..edac84e2aaa 100644
--- a/source/blender/io/collada/AnimationImporter.cpp
+++ b/source/blender/io/collada/AnimationImporter.cpp
@@ -274,7 +274,7 @@ AnimationImporter::~AnimationImporter()
/* free unused FCurves */
for (std::vector<FCurve *>::iterator it = unused_curves.begin(); it != unused_curves.end();
it++) {
- free_fcurve(*it);
+ BKE_fcurve_free(*it);
}
if (unused_curves.size()) {
@@ -442,7 +442,7 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act)
}
action_groups_remove_channel(act, eulcu[i]);
- free_fcurve(eulcu[i]);
+ BKE_fcurve_free(eulcu[i]);
}
chan->rotmode = ROT_MODE_QUAT;
diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp
index 67b96230b02..61dded368b5 100644
--- a/source/blender/io/collada/BCAnimationCurve.cpp
+++ b/source/blender/io/collada/BCAnimationCurve.cpp
@@ -89,7 +89,7 @@ void BCAnimationCurve::init_pointer_rna(Object *ob)
void BCAnimationCurve::delete_fcurve(FCurve *fcu)
{
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
}
FCurve *BCAnimationCurve::create_fcurve(int array_index, const char *rna_path)
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index f14e81a38df..2197764794b 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2182,7 +2182,7 @@ bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop)
}
for (index = 0; index < len; index++) {
- if (rna_get_fcurve(ptr, prop, index, NULL, NULL, &driven, &special)) {
+ if (BKE_fcurve_find_by_rna(ptr, prop, index, NULL, NULL, &driven, &special)) {
return true;
}
}
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index facbf8d59cc..e67366fc7ef 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -147,7 +147,7 @@ static FCurve *rna_Action_fcurve_find(bAction *act,
}
/* Returns NULL if not found. */
- return list_find_fcurve(&act->curves, data_path, index);
+ return BKE_fcurve_find(&act->curves, data_path, index);
}
static void rna_Action_fcurve_remove(bAction *act, ReportList *reports, PointerRNA *fcu_ptr)
@@ -164,7 +164,7 @@ static void rna_Action_fcurve_remove(bAction *act, ReportList *reports, PointerR
}
action_groups_remove_channel(act, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
RNA_POINTER_INVALIDATE(fcu_ptr);
}
else {
@@ -174,7 +174,7 @@ static void rna_Action_fcurve_remove(bAction *act, ReportList *reports, PointerR
}
BLI_remlink(&act->curves, fcu);
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
RNA_POINTER_INVALIDATE(fcu_ptr);
}
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 7ea44bce6db..823446a9d3b 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -648,7 +648,7 @@ static FCurve *rna_Driver_from_existing(AnimData *adt, bContext *C, FCurve *src_
}
else {
/* just make a copy of the existing one and add to self */
- FCurve *new_fcu = copy_fcurve(src_driver);
+ FCurve *new_fcu = BKE_fcurve_copy(src_driver);
/* XXX: if we impose any ordering on these someday, this will be problematic */
BLI_addtail(&adt->drivers, new_fcu);
@@ -664,7 +664,7 @@ static FCurve *rna_Driver_new(
return NULL;
}
- if (list_find_fcurve(&adt->drivers, rna_path, array_index)) {
+ if (BKE_fcurve_find(&adt->drivers, rna_path, array_index)) {
BKE_reportf(reports, RPT_ERROR, "Driver '%s[%d]' already exists", rna_path, array_index);
return NULL;
}
@@ -683,7 +683,7 @@ static void rna_Driver_remove(AnimData *adt, Main *bmain, ReportList *reports, F
BKE_report(reports, RPT_ERROR, "Driver not found in this animation data");
return;
}
- free_fcurve(fcu);
+ BKE_fcurve_free(fcu);
DEG_relations_tag_update(bmain);
}
@@ -698,7 +698,7 @@ static FCurve *rna_Driver_find(AnimData *adt,
}
/* Returns NULL if not found. */
- return list_find_fcurve(&adt->drivers, data_path, index);
+ return BKE_fcurve_find(&adt->drivers, data_path, index);
}
bool rna_AnimaData_override_apply(Main *UNUSED(bmain),
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 9fceafd8374..e49186f4cb1 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -579,7 +579,7 @@ static void rna_FCurve_group_set(PointerRNA *ptr,
/* calculate time extents of F-Curve */
static void rna_FCurve_range(FCurve *fcu, float range[2])
{
- calc_fcurve_range(fcu, range, range + 1, false, false);
+ BKE_fcurve_calc_range(fcu, range, range + 1, false, false);
}
static bool rna_FCurve_is_empty_get(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 230d62d2a23..b0dda1237b0 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -382,7 +382,7 @@ static FCurve *rna_NlaStrip_fcurve_find(NlaStrip *strip,
}
/* Returns NULL if not found. */
- return list_find_fcurve(&strip->fcurves, data_path, index);
+ return BKE_fcurve_find(&strip->fcurves, data_path, index);
}
static NlaStrip *rna_NlaStrip_new(ID *id,
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index d8043ee2fdf..d792b2032b5 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -354,7 +354,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
if (prop) {
NlaStrip *strip = ptr.data;
- FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
+ FCurve *fcu = BKE_fcurve_find(&strip->fcurves, RNA_property_identifier(prop), index);
result = insert_keyframe_direct(&reports, ptr, prop, fcu, cfra, keytype, NULL, options);
}
@@ -462,7 +462,7 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb
if (prop) {
ID *id = ptr.owner_id;
NlaStrip *strip = ptr.data;
- FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
+ FCurve *fcu = BKE_fcurve_find(&strip->fcurves, RNA_property_identifier(prop), index);
/* NOTE: This should be true, or else we wouldn't be able to get here. */
BLI_assert(fcu != NULL);
@@ -577,13 +577,13 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
if (index == -1) { /* all, use a list */
int i = 0;
ret = PyList_New(0);
- while ((fcu = list_find_fcurve(&adt->drivers, path_full, i++))) {
+ while ((fcu = BKE_fcurve_find(&adt->drivers, path_full, i++))) {
RNA_pointer_create(id, &RNA_FCurve, fcu, &tptr);
PyList_APPEND(ret, pyrna_struct_CreatePyObject(&tptr));
}
}
else {
- fcu = list_find_fcurve(&adt->drivers, path_full, index);
+ fcu = BKE_fcurve_find(&adt->drivers, path_full, index);
RNA_pointer_create(id, &RNA_FCurve, fcu, &tptr);
ret = pyrna_struct_CreatePyObject(&tptr);
}