From 833130aa7865ef43459667d5d63ab0022d2dd330 Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Fri, 14 Apr 2023 15:03:55 -0700 Subject: [PATCH] Do not attempt to convert 2.x XML resources Godot 2.x allowed for non-scene (and sometimes scene) resources stored in XML format, we don't currently support it --- utility/import_exporter.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utility/import_exporter.cpp b/utility/import_exporter.cpp index c173710b..8beba04d 100644 --- a/utility/import_exporter.cpp +++ b/utility/import_exporter.cpp @@ -119,7 +119,7 @@ Error ImportExporter::_export_imports(const String &p_out_dir, const Vectorget_source_file().get_extension(); + String src_ext = iinfo->get_source_file().get_extension().to_lower(); // ***** Export resource ***** if (opt_export_textures && importer == "texture") { // Right now we only convert 2d image textures @@ -164,6 +164,13 @@ Error ImportExporter::_export_imports(const String &p_out_dir, const Vectorget_source_file().get_extension() == "tres" && iinfo->get_source_file().get_extension() == "res") || // (opt_bin2text && iinfo->get_importer() == "scene" && iinfo->get_source_file().get_extension() == "tscn") ) { + // We don't currently support converting old 2.x xml resources + if (src_ext == "xml") { + WARN_PRINT_ONCE("Conversion of Godot 2.x xml resource files currently unimplemented"); + report_unsupported_resource(type, src_ext, path); + not_converted.push_back(iinfo); + continue; + } err = convert_res_bin_2_txt(output_dir, iinfo->get_path(), iinfo->get_export_dest()); // v2-v3 export left the autoconverted resource in the main path, remove it if (get_ver_major() <= 3 && !err) { @@ -401,7 +408,7 @@ Error ImportExporter::decompile_scripts(const String &p_out_dir) { Ref da = DirAccess::open(p_out_dir); print_verbose("decompiling " + f); bool encrypted = false; - if (f.get_extension() == "gde") { + if (f.get_extension().to_lower() == "gde") { encrypted = true; err = decomp->decompile_byte_code_encrypted(f, get_settings()->get_encryption_key()); } else {