Godot Engine – Multi-platform 2D and 3D game engine
[Export] Suppress duplicate texture format errors in UI and add missing in console mode.
Pāvels Nadtočajevs2b1959a47657
diff --git a/editor/export/editor_export_platform_apple_embedded.cpp b/editor/export/editor_export_platform_apple_embedded.cppindex f75f0e66b2d..6dbfa98027a 100644--- a/editor/export/editor_export_platform_apple_embedded.cpp+++ b/editor/export/editor_export_platform_apple_embedded.cpp@@ -2291,6 +2291,9 @@ bool EditorExportPlatformAppleEmbedded::has_valid_project_configuration(const Re}if (!ResourceImporterTextureSettings::should_import_etc2_astc()) {+ if (EditorNode::is_cmdline_mode()) {+ err += vformat(TTR("ETC2/ASTC texture compression is required for %s export. In the Project Settings, search for 'ETC2' in the search field, or enable 'Advanced Settings', and go to Rendering > Textures > VRAM Compression to enable 'Import ETC2 ASTC'."), get_name()) + "\n";+ }valid = false;}diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cppindex a727fabe76c..a71913d99bc 100644--- a/platform/android/export/export_plugin.cpp+++ b/platform/android/export/export_plugin.cpp@@ -3148,7 +3148,7 @@ bool EditorExportPlatformAndroid::has_valid_project_configuration(const Ref<Editif (!ResourceImporterTextureSettings::should_import_etc2_astc()) {valid = false;if (EditorNode::is_cmdline_mode()) {- err += TTR("ETC2/ASTC texture compression is required for Android export. In Project Settings, search for 'ETC2' in the search field, or enable 'Advanced Settings' and go to Rendering > Textures > VRAM Compression to enable 'Import ETC2 ASTC'.") + "\n";+ err += TTR("ETC2/ASTC texture compression is required for Android export. In the Project Settings, search for 'ETC2' in the search field, or enable 'Advanced Settings', and go to Rendering > Textures > VRAM Compression to enable 'Import ETC2 ASTC'.") + "\n";}}diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cppindex de0c7f934db..24006662698 100644--- a/platform/macos/export/export_plugin.cpp+++ b/platform/macos/export/export_plugin.cpp@@ -2487,13 +2487,17 @@ bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorEString architecture = p_preset->get("binary_format/architecture");if (architecture == "universal" || architecture == "x86_64") {if (!ResourceImporterTextureSettings::should_import_s3tc_bptc()) {- err += TTR("Cannot export for universal or x86_64 if S3TC BPTC texture format is disabled. Enable it in the Project Settings (Rendering > Textures > VRAM Compression > Import S3TC BPTC).") + "\n";+ if (EditorNode::is_cmdline_mode()) {+ err += TTR("Cannot export for universal or x86_64 if S3TC BPTC texture format is disabled. Enable it in the Project Settings (Rendering > Textures > VRAM Compression > Import S3TC BPTC).") + "\n";+ }valid = false;}}if (architecture == "universal" || architecture == "arm64") {if (!ResourceImporterTextureSettings::should_import_etc2_astc()) {- err += TTR("Cannot export for universal or arm64 if ETC2 ASTC texture format is disabled. Enable it in the Project Settings (Rendering > Textures > VRAM Compression > Import ETC2 ASTC).") + "\n";+ if (EditorNode::is_cmdline_mode()) {+ err += TTR("Cannot export for universal or arm64 if ETC2 ASTC texture format is disabled. Enable it in the Project Settings (Rendering > Textures > VRAM Compression > Import ETC2 ASTC).") + "\n";+ }valid = false;}}diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cppindex aded5956238..aaed4066a5e 100644--- a/platform/web/export/export_plugin.cpp+++ b/platform/web/export/export_plugin.cpp@@ -470,6 +470,9 @@ bool EditorExportPlatformWeb::has_valid_project_configuration(const Ref<EditorExif (p_preset->get("vram_texture_compression/for_mobile")) {if (!ResourceImporterTextureSettings::should_import_etc2_astc()) {+ if (EditorNode::is_cmdline_mode()) {+ err += TTR("ETC2/ASTC texture compression is required for Web export. In the Project Settings, search for 'ETC2' in the search field, or enable 'Advanced Settings', and go to Rendering > Textures > VRAM Compression to enable 'Import ETC2 ASTC'.") + "\n";+ }valid = false;}}