From a7fa34db1d0ff12079cd72cf0de437c5ca1f0a04 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 27 Oct 2023 21:49:34 +0200 Subject: [PATCH] Ignore path error for built-in scripts/shaders --- editor/script_create_dialog.cpp | 2 +- editor/shader_create_dialog.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 0472f48c62f..25e17ccd2ac 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -633,7 +633,7 @@ void ScriptCreateDialog::_update_dialog() { validation_panel->set_message(MSG_ID_SCRIPT, TTR("File exists, it will be reused."), EditorValidationPanel::MSG_OK); } - if (!path_error.is_empty()) { + if (!is_built_in && !path_error.is_empty()) { validation_panel->set_message(MSG_ID_PATH, path_error, EditorValidationPanel::MSG_ERROR); } diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index 53ec1180a37..63e7077d3f0 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -494,7 +494,7 @@ void ShaderCreateDialog::_update_dialog() { if (!is_built_in && !is_path_valid) { validation_panel->set_message(MSG_ID_SHADER, TTR("Invalid path."), EditorValidationPanel::MSG_ERROR); } - if (!path_error.is_empty()) { + if (!is_built_in && !path_error.is_empty()) { validation_panel->set_message(MSG_ID_PATH, path_error, EditorValidationPanel::MSG_ERROR); } else if (validation_panel->is_valid() && !is_new_shader_created) { validation_panel->set_message(MSG_ID_SHADER, TTR("File exists, it will be reused."), EditorValidationPanel::MSG_OK);