Fix animation signal caches_cleared firing timing

(cherry picked from commit 962b6a3e8f)
This commit is contained in:
Silc Renew 2022-12-02 14:05:04 +09:00 committed by Haoyu Qiu
parent cbc8ccbe20
commit 1a45268639
2 changed files with 2 additions and 2 deletions

View file

@ -1337,7 +1337,6 @@ float AnimationPlayer::get_current_animation_length() const {
void AnimationPlayer::_animation_changed() {
clear_caches();
emit_signal("caches_cleared");
if (is_playing()) {
playback.seeked = true; //need to restart stuff, like audio
}
@ -1376,6 +1375,8 @@ void AnimationPlayer::clear_caches() {
cache_update_size = 0;
cache_update_prop_size = 0;
cache_update_bezier_size = 0;
emit_signal("caches_cleared");
}
void AnimationPlayer::set_active(bool p_active) {

View file

@ -713,7 +713,6 @@ void AnimationTree::_clear_caches() {
memdelete(track_cache[*K]);
}
playing_caches.clear();
track_cache.clear();
cache_valid = false;
}