From 1f411d7e22e6f96fb216af8aabaeb2829f613392 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Fri, 6 Oct 2017 12:04:01 -0300 Subject: [PATCH] Convert filter/gen_mipmaps on godot3 exporter --- editor/editor_export_godot3.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/editor_export_godot3.cpp b/editor/editor_export_godot3.cpp index 4fd809ed8d2..1916a97d3c2 100644 --- a/editor/editor_export_godot3.cpp +++ b/editor/editor_export_godot3.cpp @@ -1947,6 +1947,11 @@ void EditorExportGodot3::_save_config(const String &p_path) { } } + String str = "{\n\"flags/filter\": " + String(GLOBAL_DEF("image_loader/filter", true) ? "true" : "false"); + str += ",\n\"flags/mipmaps\": " + String(GLOBAL_DEF("image_loader/gen_mipmaps", true) ? "true" : "false"); + str += "\n}"; + new_cfg.set_value("importer_defaults", "texture", str); + // Write the collected ConfigFile manually - we need to use _get_property_as_text() // above, so we can't rely on ConfigFile.save() to properly store the raw strings. FileAccessRef f = FileAccess::open(p_path.plus_file("project.godot"), FileAccess::WRITE);