summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-19 17:06:57 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-19 17:06:57 +0100
commitfb10e67fefb85af3b8f5abd30db561588d8456c6 (patch)
treea832ac1e7a98b4a7caa46e0172ada665a3fece22
parent371597a8055fd45cdbdce592c4f16875fb6cdbe7 (diff)
parentae97cf2ff01a385d6eeb2ff866ad5d6f8e8fae16 (diff)
downloadredot-engine-fb10e67fefb85af3b8f5abd30db561588d8456c6.tar.gz
Merge pull request #88557 from akien-mga/fix-animation-mixer-resolving-tracks
Fix AnimationMixer breaking animations with redundant check
-rw-r--r--scene/animation/animation_mixer.cpp7
-rw-r--r--scene/main/node.cpp2
2 files changed, 1 insertions, 8 deletions
diff --git a/scene/animation/animation_mixer.cpp b/scene/animation/animation_mixer.cpp
index 706d210064..87ac0bf5c8 100644
--- a/scene/animation/animation_mixer.cpp
+++ b/scene/animation/animation_mixer.cpp
@@ -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) {
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index e814e4f0cd..f827f68def 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -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;
}