Skip to content

Commit

Permalink
Merge pull request #84405 from KoBeWi/no_escaping_the_RESET
Browse files Browse the repository at this point in the history
Fix RESET not effective when saving inactive scene
  • Loading branch information
YuriSizov committed Nov 6, 2023
2 parents e5f1cbf + 8d71095 commit dfcbc1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scene/animation/animation_mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<AnimationLibrary> 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);
Expand Down

0 comments on commit dfcbc1d

Please sign in to comment.