From 309d538703d9ae0b316a06668f68636ed81f2ed5 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 13 Jun 2022 20:13:30 +0200 Subject: [PATCH] Print messages when textures are detected as used in 3D/normal map This detection automatically changes some import options, so it's important that users are aware of this. --- editor/import/resource_importer_texture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 21c04342e..751cd275a 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -103,11 +103,13 @@ void ResourceImporterTexture::update_imports() { } if (E->get() & MAKE_NORMAL_FLAG && int(cf->get_value("params", "compress/normal_map")) == 0) { + print_line(vformat(TTR("%s: Texture detected as used as a normal map in 3D. Enabling red-green texture compression to reduce memory usage (blue channel is discarded)."), String(E->key()))); cf->set_value("params", "compress/normal_map", 1); changed = true; } if (E->get() & MAKE_3D_FLAG && bool(cf->get_value("params", "detect_3d"))) { + print_line(vformat(TTR("%s: Texture detected as used in 3D. Enabling filter, repeat, mipmap generation and VRAM texture compression."), String(E->key()))); cf->set_value("params", "detect_3d", false); cf->set_value("params", "compress/mode", 2); cf->set_value("params", "flags/repeat", true);