Godot Engine – Multi-platform 2D and 3D game engine
Hide `High Quality Mode` import setting when compress mode is not `VRAM Compressed`
BlueCube33104fc2e7a074a9
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cppindex ee0d09d7ac4..8b9a1a9be57 100644--- a/editor/import/resource_importer_layered_texture.cpp+++ b/editor/import/resource_importer_layered_texture.cpp@@ -120,7 +120,8 @@ String ResourceImporterLayeredTexture::get_resource_type() const {bool ResourceImporterLayeredTexture::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const {if (p_option == "compress/high_quality_mode") {- return bool(p_options["compress/high_quality"]);+ int compress_mode = int(p_options["compress/mode"]);+ return compress_mode == COMPRESS_VRAM_COMPRESSED && bool(p_options["compress/high_quality"]);}if (p_option == "compress/lossy_quality" && p_options.has("compress/mode")) {return int(p_options["compress/mode"]) == COMPRESS_LOSSY;diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cppindex 42e3627256a..f458126e880 100644--- a/editor/import/resource_importer_texture.cpp+++ b/editor/import/resource_importer_texture.cpp@@ -181,7 +181,9 @@ String ResourceImporterTexture::get_resource_type() const {bool ResourceImporterTexture::get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const {if (p_option == "compress/high_quality_mode") {- return bool(p_options["compress/high_quality"]);+ int compress_mode = int(p_options["compress/mode"]);+ return compress_mode == COMPRESS_VRAM_COMPRESSED && bool(p_options["compress/high_quality"]);+} else if (p_option == "compress/high_quality" || p_option == "compress/hdr_compression") {int compress_mode = int(p_options["compress/mode"]);if (compress_mode != COMPRESS_VRAM_COMPRESSED) {