summaryrefslogtreecommitdiffstats
path: root/editor/export/editor_export.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2023-06-19 20:03:51 -0500
committerAaron Franke <arnfranke@yahoo.com>2023-06-20 10:58:34 -0500
commit1a70d8260643b769587bf95f12d42d08d74d1b5b (patch)
tree7765cc7e03c1bcf8493a57c3b90b052cd2c9f9fa /editor/export/editor_export.cpp
parent217a20a8a09bc305674bf3790c29cf2e8e257553 (diff)
downloadredot-engine-1a70d8260643b769587bf95f12d42d08d74d1b5b.tar.gz
Check if the required texture format is imported in the export dialog
Diffstat (limited to 'editor/export/editor_export.cpp')
-rw-r--r--editor/export/editor_export.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/editor/export/editor_export.cpp b/editor/export/editor_export.cpp
index c6faefc45f..106f793210 100644
--- a/editor/export/editor_export.cpp
+++ b/editor/export/editor_export.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/io/config_file.h"
+#include "editor/import/resource_importer_texture_settings.h"
EditorExport *EditorExport::singleton = nullptr;
@@ -136,20 +137,16 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
- const bool etc2_supported = GLOBAL_GET("rendering/textures/vram_compression/import_etc2_astc");
-
- if (!etc2_supported) {
- return TTR("Target platform requires 'ETC2/ASTC' texture compression. Enable 'Import ETC2 ASTC' in Project Settings.");
+ if (!ResourceImporterTextureSettings::should_import_etc2_astc()) {
+ return TTR("Target platform requires 'ETC2/ASTC' texture compression. Enable 'Import ETC2 ASTC' in Project Settings.") + "\n";
}
return String();
}
String EditorExportPlatform::test_bc() const {
- const bool bc_supported = GLOBAL_GET("rendering/textures/vram_compression/import_s3tc_bptc");
-
- if (!bc_supported) {
- return TTR("Target platform requires 'S3TC/BPTC' texture compression. Enable 'Import S3TC BPTC' in Project Settings.");
+ if (!ResourceImporterTextureSettings::should_import_s3tc_bptc()) {
+ return TTR("Target platform requires 'S3TC/BPTC' texture compression. Enable 'Import S3TC BPTC' in Project Settings.") + "\n";
}
return String();