Merge pull request #62337 from reduz/respect-disabled-animation-tracks

Respect disabled animation tracks
This commit is contained in:
Rémi Verschelde 2022-06-23 09:13:54 +02:00 committed by GitHub
commit 64918e4ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -283,6 +283,9 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim, Node *p_root_ov
setup_pass++;
for (int i = 0; i < a->get_track_count(); i++) {
if (!a->track_is_enabled(i)) {
continue;
}
p_anim->node_cache.write[i] = nullptr;
Ref<Resource> resource;
Vector<StringName> leftover_path;

View File

@ -965,6 +965,10 @@ void AnimationTree::_process_graph(double p_delta) {
#endif // _3D_DISABLED
for (int i = 0; i < a->get_track_count(); i++) {
if (!a->track_is_enabled(i)) {
continue;
}
NodePath path = a->track_get_path(i);
ERR_CONTINUE(!track_cache.has(path));