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:
authorPhilipp Oeser <info@graphics-engineer.com>2022-04-06 12:40:31 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-04-12 12:02:44 +0300
commit4fd3d96f46ea4d9f30cdd9d0bc957c776b6f4e83 (patch)
treee26eb472dc12afb9875499d84bbfe00c4addfa6e
parentfbca6aeb7c9393e9620a23f6d0915d5f58fb7930 (diff)
Fix Pushdown of an action from the Action Editor lacks immediate updates
The issue reported was that the recently introduced manual framerange of an action (see rB5d59b38605d6) was not having an immediate effect in case the action was pushed down from the Action Editor and only showed its effects after e.g. saving and reloading the file. However doing the same thing (pushing down the action) was working fine when done from the NLA. Now bring pushdown in sync (in terms of DEG update tagging) between the Action Editor and the NLA, meaning that now both the owner and the action are tagged when pushdown happens from the Action Editor as well. Fixes T96964. Maniphest Tasks: T96964 Differential Revision: https://developer.blender.org/D14564
-rw-r--r--source/blender/editors/space_action/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_action/action_data.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt
index 9e292062f27..841bd5cf91b 100644
--- a/source/blender/editors/space_action/CMakeLists.txt
+++ b/source/blender/editors/space_action/CMakeLists.txt
@@ -5,6 +5,7 @@ set(INC
../../blenkernel
../../blenlib
../../blentranslation
+ ../../depsgraph
../../gpu
../../makesdna
../../makesrna
diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c
index 36858d57446..8f97a58451e 100644
--- a/source/blender/editors/space_action/action_data.c
+++ b/source/blender/editors/space_action/action_data.c
@@ -45,6 +45,8 @@
#include "ED_mask.h"
#include "ED_screen.h"
+#include "DEG_depsgraph.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -335,6 +337,13 @@ static int action_pushdown_exec(bContext *C, wmOperator *op)
/* action can be safely added */
BKE_nla_action_pushdown(adt, ID_IS_OVERRIDE_LIBRARY(adt_id_owner));
+ struct Main *bmain = CTX_data_main(C);
+ DEG_id_tag_update_ex(bmain, adt_id_owner, 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);
+
/* Stop displaying this action in this editor
* NOTE: The editor itself doesn't set a user...
*/