From 8d71095622862551998714805c99e82e185e2294 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 3 Nov 2023 12:58:56 +0100 Subject: [PATCH] Fix RESET not effective when saving inactive scene --- scene/animation/animation_mixer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/animation/animation_mixer.cpp b/scene/animation/animation_mixer.cpp index 8e25b3ed16e0..fb17dae8323c 100644 --- a/scene/animation/animation_mixer.cpp +++ b/scene/animation/animation_mixer.cpp @@ -1998,10 +1998,11 @@ void AnimationMixer::reset() { ERR_FAIL_NULL(root_node_object); AnimationPlayer *aux_player = memnew(AnimationPlayer); - EditorNode::get_singleton()->add_child(aux_player); + root_node_object->add_child(aux_player); Ref al; al.instantiate(); al->add_animation(SceneStringNames::get_singleton()->RESET, reset_anim); + aux_player->set_reset_on_save_enabled(false); aux_player->set_root_node(aux_player->get_path_to(root_node_object)); aux_player->add_animation_library("", al); aux_player->set_assigned_animation(SceneStringNames::get_singleton()->RESET);