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-03-06 05:41:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-06 06:16:38 +0300
commitb15c658801e191e09a4e9e8933a9ac79a3805e1b (patch)
treec840c2b20564898b1c7c528cba964bf485bb83a6 /source/blender/makesrna/intern/rna_action.c
parent07d13be678c6b8d5c5c793f664668831ac265f9e (diff)
Cleanup: keyframe API naming, high level keyframe API
- Split 'verify_fcurve' into two functions: ED_action_fcurve_ensure which adds the f-curve if needed. ED_action_fcurve_find which returns NULL when not found. Callers of ED_action_fcurve_find had unused 'group' argument which has been removed. - Rename verify_adt_action to ED_id_action_ensure It had an argument to add data which was always true, remove this instead of splitting in into a separate function.
Diffstat (limited to 'source/blender/makesrna/intern/rna_action.c')
-rw-r--r--source/blender/makesrna/intern/rna_action.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 6eaf303ce2d..436e847b044 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -123,8 +123,8 @@ static FCurve *rna_Action_fcurve_new(bAction *act,
return NULL;
}
- /* annoying, check if this exists */
- if (verify_fcurve(bmain, act, group, NULL, data_path, index, 0)) {
+ /* Annoying, check if this exists. */
+ if (ED_action_fcurve_find(act, data_path, index)) {
BKE_reportf(reports,
RPT_ERROR,
"F-Curve '%s[%d]' already exists in action '%s'",
@@ -133,7 +133,7 @@ static FCurve *rna_Action_fcurve_new(bAction *act,
act->id.name + 2);
return NULL;
}
- return verify_fcurve(bmain, act, group, NULL, data_path, index, 1);
+ return ED_action_fcurve_ensure(bmain, act, group, NULL, data_path, index);
}
static FCurve *rna_Action_fcurve_find(bAction *act,