1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #107468 from Calinou/editor-animationtree-warn-disabled

Display AnimationTree editor warnings when the node is disabled
This commit is contained in:
Thaddeus Crews
2025-09-30 18:35:14 -05:00
6 changed files with 28 additions and 20 deletions

View File

@@ -589,11 +589,7 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
String error;
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();
}
error = tree->get_editor_error_message();
if (error != error_label->get_text()) {
error_label->set_text(error);

View File

@@ -812,11 +812,9 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
String error;
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 (blend_space->get_triangle_count() == 0) {
error = tree->get_editor_error_message();
if (error.is_empty() && blend_space->get_triangle_count() == 0) {
error = TTR("No triangles exist, so no blending can take place.");
}

View File

@@ -970,11 +970,7 @@ void AnimationNodeBlendTreeEditor::_notification(int p_what) {
String error;
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();
}
error = tree->get_editor_error_message();
if (error != error_label->get_text()) {
error_label->set_text(error);

View File

@@ -1393,11 +1393,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");
}