[Bf-blender-cvs] [f3ac39b8573] master: Fix T80708: FCurve modifiers change behavior after editing NLA clip

Sybren A. Stüvel noreply at git.blender.org
Thu Sep 24 15:19:12 CEST 2020


Commit: f3ac39b857394d804df04d893517ebd1a403de19
Author: Sybren A. Stüvel
Date:   Thu Sep 24 15:15:17 2020 +0200
Branches: master
https://developer.blender.org/rBf3ac39b857394d804df04d893517ebd1a403de19

Fix T80708: FCurve modifiers change behavior after editing NLA clip

Tag an Action for recalculating animation when it's pushed down onto the
NLA stack, as its effective boundaries change. Normally an Action spans
all of the timeline, and the effects of Cycle modifiers are visible
everywhere. When the Action is converted to an NLA clip, the modifier's
effect should only be visible for the duration of the NLA clip.

===================================================================

M	source/blender/editors/space_nla/nla_channels.c

===================================================================

diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 3cc4c0247aa..f6f3571018a 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -518,7 +518,12 @@ static int nlachannels_pushdown_exec(bContext *C, wmOperator *op)
   /* 'push-down' action - only usable when not in TweakMode */
   BKE_nla_action_pushdown(adt);
 
-  DEG_id_tag_update_ex(CTX_data_main(C), id, ID_RECALC_ANIMATION);
+  struct Main *bmain = CTX_data_main(C);
+  DEG_id_tag_update_ex(bmain, id, ID_RECALC_ANIMATION);
+
+  /* The action needs updating too, as FCurve modifiers are to be reevaluated. They won't extend
+   * beyond the NLA strip after pushing down to the NLA. */
+  DEG_id_tag_update_ex(bmain, &adt->action->id, ID_RECALC_ANIMATION);
 
   /* set notifier that things have changed */
   WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL);



More information about the Bf-blender-cvs mailing list