From 2b1959a476573dd0e47dfcbfdd60c6578d74f058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Wed, 27 May 2026 10:48:07 +0300 Subject: [PATCH] [Export] Suppress duplicate texture format errors in UI and add missing in console mode. --- editor/export/editor_export_platform_apple_embedded.cpp | 3 +++ platform/android/export/export_plugin.cpp | 2 +- platform/macos/export/export_plugin.cpp | 8 ++++++-- platform/web/export/export_plugin.cpp | 3 +++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/editor/export/editor_export_platform_apple_embedded.cpp b/editor/export/editor_export_platform_apple_embedded.cpp index f75f0e66b2..6dbfa98027 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.cpp index a727fabe76..a71913d99b 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 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.cpp index de0c7f934d..2400666269 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 Refget("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.cpp index aded595623..aaed4066a5 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 Refget("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; } }