summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_tree.cpp')
-rw-r--r--scene/animation/animation_tree.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 4880a0f6ed..d4061ab167 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -34,7 +34,6 @@
#include "animation_blend_tree.h"
#include "core/config/engine.h"
#include "scene/animation/animation_player.h"
-#include "scene/scene_string_names.h"
void AnimationNode::get_parameter_list(List<PropertyInfo> *r_list) const {
Array parameters;
@@ -627,7 +626,7 @@ bool AnimationTree::_blend_pre_process(double p_delta, int p_track_count, const
for (int i = 0; i < p_track_count; i++) {
src_blendsw[i] = 1.0; // By default all go to 1 for the root input.
}
- root_animation_node->node_state.base_path = SceneStringNames::get_singleton()->parameters_base_path;
+ root_animation_node->node_state.base_path = SceneStringName(parameters_base_path);
root_animation_node->node_state.parent = nullptr;
}
@@ -788,7 +787,7 @@ void AnimationTree::_update_properties() {
input_activity_map_get.clear();
if (root_animation_node.is_valid()) {
- _update_properties_for_node(SceneStringNames::get_singleton()->parameters_base_path, root_animation_node);
+ _update_properties_for_node(SceneStringName(parameters_base_path), root_animation_node);
}
properties_dirty = false;
@@ -810,7 +809,7 @@ void AnimationTree::_notification(int p_what) {
void AnimationTree::set_animation_player(const NodePath &p_path) {
animation_player = p_path;
if (p_path.is_empty()) {
- set_root_node(SceneStringNames::get_singleton()->path_pp);
+ set_root_node(SceneStringName(path_pp));
while (animation_libraries.size()) {
remove_animation_library(animation_libraries[0].name);
}
@@ -854,10 +853,10 @@ void AnimationTree::_setup_animation_player() {
}
List<StringName> list;
player->get_animation_library_list(&list);
- for (int i = 0; i < list.size(); i++) {
- Ref<AnimationLibrary> lib = player->get_animation_library(list[i]);
+ for (const StringName &E : list) {
+ Ref<AnimationLibrary> lib = player->get_animation_library(E);
if (lib.is_valid()) {
- add_animation_library(list[i], lib);
+ add_animation_library(E, lib);
}
}
}