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/animation/anim_channels_defines.c
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/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 1af5721bffd..95165e35fd9 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -4357,7 +4357,7 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi
ListBase nla_cache = {NULL, NULL};
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short flag = 0;
+ eInsertKeyFlags flag = 0;
bool done = false;
float cfra;
@@ -4371,8 +4371,8 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi
/* get current frame and apply NLA-mapping to it (if applicable) */
cfra = BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
- /* get flags for keyframing */
- flag = ANIM_get_keyframing_flags(scene, 1);
+ /* Get flags for keyframing. */
+ flag = ANIM_get_keyframing_flags(scene, true);
/* try to resolve the path stored in the F-Curve */
if (RNA_path_resolve_property(&id_ptr, fcu->rna_path, &ptr, &prop)) {
@@ -4411,7 +4411,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
ListBase nla_cache = {NULL, NULL};
PointerRNA id_ptr, ptr;
PropertyRNA *prop;
- short flag = 0;
+ eInsertKeyFlags flag = 0;
bool done = false;
float cfra;
@@ -4426,7 +4426,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
cfra = BKE_nla_tweakedit_remap(key->adt, (float)CFRA, NLATIME_CONVERT_UNMAP);
/* get flags for keyframing */
- flag = ANIM_get_keyframing_flags(scene, 1);
+ flag = ANIM_get_keyframing_flags(scene, true);
/* try to resolve the path stored in the F-Curve */
if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) {
@@ -4472,7 +4472,7 @@ static void achannel_setting_slider_nla_curve_cb(bContext *C,
ReportList *reports = CTX_wm_reports(C);
Scene *scene = CTX_data_scene(C);
ToolSettings *ts = scene->toolsettings;
- short flag = 0;
+ eInsertKeyFlags flag = 0;
bool done = false;
float cfra;
@@ -4480,7 +4480,7 @@ static void achannel_setting_slider_nla_curve_cb(bContext *C,
cfra = (float)CFRA;
/* get flags for keyframing */
- flag = ANIM_get_keyframing_flags(scene, 1);
+ flag = ANIM_get_keyframing_flags(scene, true);
/* Get pointer and property from the slider -
* this should all match up with the NlaStrip required. */