diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-06 05:41:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-06 06:16:38 +0300 |
commit | b15c658801e191e09a4e9e8933a9ac79a3805e1b (patch) | |
tree | c840c2b20564898b1c7c528cba964bf485bb83a6 /source/blender/editors/include/ED_keyframing.h | |
parent | 07d13be678c6b8d5c5c793f664668831ac265f9e (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/editors/include/ED_keyframing.h')
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index ac3007afe5d..e4d86a026e3 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -65,18 +65,21 @@ short ANIM_get_keyframing_flags(struct Scene *scene, short incl_mode); /* Get (or add relevant data to be able to do so) the Active Action for the given * Animation Data block, given an ID block where the Animation Data should reside. */ -struct bAction *verify_adt_action(struct Main *bmain, struct ID *id, short add); +struct bAction *ED_id_action_ensure(struct Main *bmain, struct ID *id); /* Get (or add relevant data to be able to do so) F-Curve from the given Action. * This assumes that all the destinations are valid. */ -struct FCurve *verify_fcurve(struct Main *bmain, - struct bAction *act, - const char group[], - struct PointerRNA *ptr, - const char rna_path[], - const int array_index, - short add); +struct FCurve *ED_action_fcurve_ensure(struct Main *bmain, + struct bAction *act, + const char group[], + struct PointerRNA *ptr, + const char rna_path[], + const int array_index); + +struct FCurve *ED_action_fcurve_find(struct bAction *act, + const char rna_path[], + const int array_index); /* -------- */ @@ -145,7 +148,6 @@ short delete_keyframe(struct Main *bmain, struct ReportList *reports, struct ID *id, struct bAction *act, - const char group[], const char rna_path[], int array_index, float cfra, |