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:
authorSybren A. Stüvel <sybren@blender.org>2020-09-28 13:03:04 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-09-28 13:03:04 +0300
commit825a32439aae577afd424fba48094cb8f92d2541 (patch)
tree9c5c044bbb68b7bb77f3e102dd104fa06246405e /source/blender/makesrna
parentf808f2a4950a99f74780ea87e9d62ee36bc4ff35 (diff)
Cleanup: Animation, remove unused parameter from anim tagging function
Remove `bool flush` parameter from `rna_tag_animation_update()`, as every call uses `true` anyway. No functional changes.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index ac4395f08c9..bbeebb4861e 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -588,11 +588,10 @@ static bool rna_FCurve_is_empty_get(PointerRNA *ptr)
return BKE_fcurve_is_empty(fcu);
}
-static void rna_tag_animation_update(Main *bmain, ID *id, bool flush)
+static void rna_tag_animation_update(Main *bmain, ID *id)
{
/* Actually recalculate object properties, or just update COW. */
- int tags = flush ? ID_RECALC_ANIMATION : ID_RECALC_ANIMATION_NO_FLUSH;
-
+ const int tags = ID_RECALC_ANIMATION;
AnimData *adt = BKE_animdata_from_id(id);
if (adt && adt->action) {
@@ -609,7 +608,7 @@ static void rna_FCurve_update_data_ex(ID *id, FCurve *fcu, Main *bmain)
sort_time_fcurve(fcu);
calchandles_fcurve(fcu);
- rna_tag_animation_update(bmain, id, true);
+ rna_tag_animation_update(bmain, id);
}
/* RNA update callback for F-Curves after curve shape changes */
@@ -631,7 +630,7 @@ static void rna_FCurve_update_data_relations(Main *bmain,
*/
static void rna_FCurve_update_eval(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
- rna_tag_animation_update(bmain, ptr->owner_id, true);
+ rna_tag_animation_update(bmain, ptr->owner_id);
}
static PointerRNA rna_FCurve_active_modifier_get(PointerRNA *ptr)
@@ -751,7 +750,7 @@ static void rna_FModifier_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
calchandles_fcurve(fcm->curve);
}
- rna_tag_animation_update(bmain, id, true);
+ rna_tag_animation_update(bmain, id);
}
static void rna_FModifier_verify_data_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -977,7 +976,7 @@ static BezTriple *rna_FKeyframe_points_insert(
fcu, frame, value, (char)keyframe_type, flag | INSERTKEY_NO_USERPREF);
if ((fcu->bezt) && (index >= 0)) {
- rna_tag_animation_update(bmain, id, true);
+ rna_tag_animation_update(bmain, id);
return fcu->bezt + index;
}
@@ -1003,7 +1002,7 @@ static void rna_FKeyframe_points_add(ID *id, FCurve *fcu, Main *bmain, int tot)
bezt++;
}
- rna_tag_animation_update(bmain, id, true);
+ rna_tag_animation_update(bmain, id);
}
}
@@ -1020,7 +1019,7 @@ static void rna_FKeyframe_points_remove(
delete_fcurve_key(fcu, index, !do_fast);
RNA_POINTER_INVALIDATE(bezt_ptr);
- rna_tag_animation_update(bmain, id, true);
+ rna_tag_animation_update(bmain, id);
}
static FCM_EnvelopeData *rna_FModifierEnvelope_points_add(
@@ -1030,7 +1029,7 @@ static FCM_EnvelopeData *rna_FModifierEnvelope_points_add(
FMod_Envelope *env = (FMod_Envelope *)fmod->data;
int i;
- rna_tag_animation_update(bmain, id, true);
+ rna_tag_animation_update(bmain, id);
/* init template data */
fed.min = -1.0f;
@@ -1082,7 +1081,7 @@ static void rna_FModifierEnvelope_points_remove(
return;
}
- rna_tag_animation_update(bmain, id, true);
+ rna_tag_animation_update(bmain, id);
if (env->totvert > 1) {
/* move data after the removed point */
@@ -1109,7 +1108,7 @@ static void rna_FModifierEnvelope_points_remove(
static void rna_Keyframe_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
- rna_tag_animation_update(bmain, ptr->owner_id, true);
+ rna_tag_animation_update(bmain, ptr->owner_id);
}
#else