You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fixed errors in AnimationPlayerEditor when switching current_animation in the inspector
Case 1: start and stop an animation in the inspector Case 2: start an animation in the inspector, then stop and start again in the track editor Fixes #34021
This commit is contained in:
@@ -85,6 +85,9 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
|||||||
track_editor->set_anim_pos(player->get_current_animation_position());
|
track_editor->set_anim_pos(player->get_current_animation_position());
|
||||||
EditorNode::get_singleton()->get_inspector()->refresh();
|
EditorNode::get_singleton()->get_inspector()->refresh();
|
||||||
|
|
||||||
|
} else if (!player->is_valid()) {
|
||||||
|
// Reset timeline when the player has been stopped externally
|
||||||
|
frame->set_value(0);
|
||||||
} else if (last_active) {
|
} else if (last_active) {
|
||||||
// Need the last frame after it stopped.
|
// Need the last frame after it stopped.
|
||||||
frame->set_value(player->get_current_animation_position());
|
frame->set_value(player->get_current_animation_position());
|
||||||
|
|||||||
Reference in New Issue
Block a user