mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Display AnimationTree editor warnings when the node is disabled
AnimationTree's Active property isn't the only way to control whether an AnimationTree can play animations. Node's Process Mode property also affects it.
This commit is contained in:
parent
e0603aeda3
commit
269ee1204d
6 changed files with 28 additions and 20 deletions
|
|
@ -1395,11 +1395,11 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
|
|||
if (error_time > 0) {
|
||||
error = error_text;
|
||||
error_time -= get_process_delta_time();
|
||||
} else if (!tree->is_active()) {
|
||||
error = TTR("AnimationTree is inactive.\nActivate to enable playback, check node warnings if activation fails.");
|
||||
} else if (tree->is_state_invalid()) {
|
||||
error = tree->get_invalid_state_reason();
|
||||
} else if (playback.is_null()) {
|
||||
} else {
|
||||
error = tree->get_editor_error_message();
|
||||
}
|
||||
|
||||
if (error.is_empty() && playback.is_null()) {
|
||||
error = vformat(TTR("No playback resource set at path: %s."), AnimationTreeEditor::get_singleton()->get_base_path() + "playback");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue