Skip to content

Commit

Permalink
Merge pull request godotengine#88557 from akien-mga/fix-animation-mix…
Browse files Browse the repository at this point in the history
…er-resolving-tracks

Fix AnimationMixer breaking animations with redundant check
  • Loading branch information
akien-mga committed Feb 19, 2024
2 parents 371597a + ae97cf2 commit fb10e67
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions scene/animation/animation_mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,6 @@ bool AnimationMixer::_update_caches() {
Ref<Resource> resource;
Vector<StringName> leftover_path;

if (!parent->has_node_and_resource(path)) {
if (check_path) {
WARN_PRINT_ED(mixer_name + ": '" + String(E) + "', couldn't resolve track: '" + String(path) + "'. This warning can be disabled in Project Settings.");
}
continue;
}

Node *child = parent->get_node_and_resource(path, resource, leftover_path);
if (!child) {
if (check_path) {
Expand Down
2 changes: 1 addition & 1 deletion scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3025,9 +3025,9 @@ Array Node::_get_node_and_resource(const NodePath &p_path) {

Node *Node::get_node_and_resource(const NodePath &p_path, Ref<Resource> &r_res, Vector<StringName> &r_leftover_subpath, bool p_last_is_property) const {
ERR_THREAD_GUARD_V(nullptr);
Node *node = get_node(p_path);
r_res = Ref<Resource>();
r_leftover_subpath = Vector<StringName>();
Node *node = get_node_or_null(p_path);
if (!node) {
return nullptr;
}
Expand Down

0 comments on commit fb10e67

Please sign in to comment.