1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Proper time tracking in AnimationNodeAnimation, closes #22887

This commit is contained in:
Juan Linietsky
2018-11-08 16:51:45 -03:00
parent 555fb3a317
commit 531dc2f435
3 changed files with 16 additions and 13 deletions

View File

@@ -692,7 +692,9 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
Ref<Animation> anim = player->get_animation(an->get_animation());
if (anim.is_valid()) {
E->get()->set_max(anim->get_length());
E->get()->set_value(an->get_playback_time());
//StringName path = AnimationTreeEditor::get_singleton()->get_base_path() + E->get().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));
}
}
}