Merge pull request #69474 from TokageItLab/fix-animation-cache-signal

Fix animation signal `caches_cleared` firing timing
This commit is contained in:
Rémi Verschelde 2022-12-02 12:24:06 +01:00
commit e9b67569f7
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View file

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

View file

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