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 08:45:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-06 09:05:18 +0300
commit73ef27f15611ccb254816e199f8c74103b3d5172 (patch)
treeb16b99d872cbfc7fe643a50b2a0122b7ac9fcf09 /source/blender/editors/include
parente97aed1e73e72174e08dc1ea152725007647a6cc (diff)
Cleanup: keyframing return arguments
- Use 'int' for counters instead of short. - Use 'bool' instead of a counter when only a change is being detected. - Use typed enum for keying set flags. - Include in comments when a negate error code may be returned.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_keyframing.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 7baaaf63d6a..2f81e28b496 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -56,9 +56,9 @@ struct NlaKeyframingContext;
/* ************ Keyframing Management **************** */
/* Get the active settings for keyframing settings from context (specifically the given scene)
- * - incl_mode: include settings from keyframing mode in the result (i.e. replace only)
+ * - use_autokey_mode: include settings from keyframing mode in the result (i.e. replace only).
*/
-short ANIM_get_keyframing_flags(struct Scene *scene, short incl_mode);
+eInsertKeyFlags ANIM_get_keyframing_flags(struct Scene *scene, const bool use_autokey_mode);
/* -------- */
@@ -129,28 +129,28 @@ bool insert_keyframe_direct(struct ReportList *reports,
* Use this to create any necessary animation data, and then insert a keyframe
* using the current value being keyframed, in the relevant place. Returns success.
*/
-short insert_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,
- eBezTriple_KeyframeType keytype,
- struct ListBase *nla_cache,
- eInsertKeyFlags flag);
+int insert_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,
+ eBezTriple_KeyframeType keytype,
+ struct ListBase *nla_cache,
+ eInsertKeyFlags flag);
/* Main Keyframing API call:
* Use this to delete keyframe on current frame for relevant channel.
* Will perform checks just in case. */
-short delete_keyframe(struct Main *bmain,
- struct ReportList *reports,
- struct ID *id,
- struct bAction *act,
- const char rna_path[],
- int array_index,
- float cfra);
+int delete_keyframe(struct Main *bmain,
+ struct ReportList *reports,
+ struct ID *id,
+ struct bAction *act,
+ const char rna_path[],
+ int array_index,
+ float cfra);
/* ************ Keying Sets ********************** */
@@ -225,7 +225,9 @@ typedef enum eModifyKey_Returns {
/* poll the current KeyingSet, updating it's set of paths
* (if "builtin"/"relative") for context changes */
-short ANIM_validate_keyingset(struct bContext *C, ListBase *dsources, struct KeyingSet *ks);
+eModifyKey_Returns ANIM_validate_keyingset(struct bContext *C,
+ ListBase *dsources,
+ struct KeyingSet *ks);
/* use the specified KeyingSet to add/remove various Keyframes on the specified frame */
int ANIM_apply_keyingset(struct bContext *C,