diff options
author | kobewi <kobewi4e@gmail.com> | 2022-03-25 18:06:46 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-08-22 18:05:10 +0200 |
commit | ece3df39386af85b069cbb67ae1893b4365f1bd3 (patch) | |
tree | 6d815d51c6e043470a08ad1eab993e4b288da8c9 /scene/animation/animation_player.cpp | |
parent | 99548e521dc049b609347cd1fe38262d59d1b0d6 (diff) |
Add per-scene UndoRedo
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r-- | scene/animation/animation_player.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 1a7bf4c302..1af12a90f2 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -37,6 +37,7 @@ #ifdef TOOLS_ENABLED #include "editor/editor_node.h" +#include "editor/editor_undo_redo_manager.h" #include "scene/2d/skeleton_2d.h" void AnimatedValuesBackup::update_skeletons() { @@ -2046,7 +2047,7 @@ Ref<AnimatedValuesBackup> AnimationPlayer::apply_reset(bool p_user_initiated) { Ref<AnimatedValuesBackup> new_values = aux_player->backup_animated_values(); old_values->restore(); - UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo(); ur->create_action(TTR("Anim Apply Reset")); ur->add_do_method(new_values.ptr(), "restore"); ur->add_undo_method(old_values.ptr(), "restore"); |