summaryrefslogtreecommitdiff
path: root/editor/import
diff options
context:
space:
mode:
authorNicholas Huelin <62965063+SirQuartz@users.noreply.github.com>2022-03-26 19:21:07 -0400
committerRĂ©mi Verschelde <remi@verschelde.fr>2022-03-28 11:36:52 +0200
commit01ca9d3eec71154b6b0d32d34cab6b9fdb6fd24c (patch)
treedebf03b3d5e0780cb36373c95211185afc454d43 /editor/import
parent795304e34f3f8ab5ee47bfc2ce09ef94cac0a113 (diff)
Hide "Normal Map" import option when using lossless compression on Texture
This pull request resolves an issue where images being imported with lossless compression allowed you to select a normal map, but the normal map only applies if you're using VRAM compression. Thereby making it redundant to appear when using lossless compression. This pull request hides the normal map option when lossless compression is selected. Resolves: #59435
Diffstat (limited to 'editor/import')
-rw-r--r--editor/import/resource_importer_texture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 8d6db7d1e0..e2fa624fc6 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -171,6 +171,11 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_path, const
if (compress_mode < COMPRESS_VRAM_COMPRESSED) {
return false;
}
+ } else if (p_option == "compress/normal_map") {
+ int compress_mode = int(p_options["compress/mode"]);
+ if (compress_mode == COMPRESS_LOSSLESS) {
+ return false;
+ }
} else if (p_option == "mipmaps/limit") {
return p_options["mipmaps/generate"];