You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Use range iterators for Map
This commit is contained in:
@@ -776,16 +776,16 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
|
||||
}
|
||||
|
||||
if (player) {
|
||||
for (Map<StringName, ProgressBar *>::Element *E = animations.front(); E; E = E->next()) {
|
||||
Ref<AnimationNodeAnimation> an = blend_tree->get_node(E->key());
|
||||
for (const KeyValue<StringName, ProgressBar *> &E : animations) {
|
||||
Ref<AnimationNodeAnimation> an = blend_tree->get_node(E.key);
|
||||
if (an.is_valid()) {
|
||||
if (player->has_animation(an->get_animation())) {
|
||||
Ref<Animation> anim = player->get_animation(an->get_animation());
|
||||
if (anim.is_valid()) {
|
||||
E->get()->set_max(anim->get_length());
|
||||
E.value->set_max(anim->get_length());
|
||||
//StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + E.input_node;
|
||||
StringName time_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E->key()) + "/time";
|
||||
E->get()->set_value(AnimationTreeEditor::get_singleton()->get_tree()->get(time_path));
|
||||
StringName time_path = AnimationTreeEditor::get_singleton()->get_base_path() + String(E.key) + "/time";
|
||||
E.value->set_value(AnimationTreeEditor::get_singleton()->get_tree()->get(time_path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user