summaryrefslogtreecommitdiff
path: root/editor/editor_export.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_export.cpp')
-rw-r--r--editor/editor_export.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 7f5f51cf70..a5ebfbfb8a 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -730,6 +730,12 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) {
//find stuff
_export_find_resources(EditorFileSystem::get_singleton()->get_filesystem(), paths);
+ } else if (p_preset->get_export_filter() == EditorExportPreset::EXCLUDE_SELECTED_RESOURCES) {
+ _export_find_resources(EditorFileSystem::get_singleton()->get_filesystem(), paths);
+ Vector<String> files = p_preset->get_files_to_export();
+ for (int i = 0; i < files.size(); i++) {
+ paths.erase(files[i]);
+ }
} else {
bool scenes_only = p_preset->get_export_filter() == EditorExportPreset::EXPORT_SELECTED_SCENES;
@@ -874,6 +880,20 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
continue;
}
+ String importer_type = config->get_value("remap", "importer");
+
+ if (importer_type == "keep") {
+ //just keep file as-is
+ Vector<uint8_t> array = FileAccess::get_file_as_array(path);
+ err = p_func(p_udata, path, array, idx, total, enc_in_filters, enc_ex_filters, key);
+
+ if (err != OK) {
+ return err;
+ }
+
+ continue;
+ }
+
List<String> remaps;
config->get_section_keys("remap", &remaps);
@@ -1380,6 +1400,10 @@ void EditorExport::_save() {
config->set_value(section, "export_filter", "resources");
save_files = true;
} break;
+ case EditorExportPreset::EXCLUDE_SELECTED_RESOURCES: {
+ config->set_value(section, "export_filter", "exclude");
+ save_files = true;
+ } break;
}
if (save_files) {
@@ -1558,6 +1582,9 @@ void EditorExport::load_config() {
} else if (export_filter == "resources") {
preset->set_export_filter(EditorExportPreset::EXPORT_SELECTED_RESOURCES);
get_files = true;
+ } else if (export_filter == "exclude") {
+ preset->set_export_filter(EditorExportPreset::EXCLUDE_SELECTED_RESOURCES);
+ get_files = true;
}
if (get_files) {