Merge pull request #113151 from akien-mga/revert-109815

Revert "Fix `EditorExportPlugin::_export_file()` ignoring GDScripts"
This commit is contained in:
Thaddeus Crews
2025-11-25 09:52:41 -06:00

View File

@ -1339,8 +1339,6 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
} }
bool do_export = true; bool do_export = true;
bool skip_all = false;
int skipped_i = export_plugins.size() - 1;
for (int i = 0; i < export_plugins.size(); i++) { for (int i = 0; i < export_plugins.size(); i++) {
if (GDVIRTUAL_IS_OVERRIDDEN_PTR(export_plugins[i], _export_file)) { if (GDVIRTUAL_IS_OVERRIDDEN_PTR(export_plugins[i], _export_file)) {
export_plugins.write[i]->_export_file_script(path, type, features_psa); export_plugins.write[i]->_export_file_script(path, type, features_psa);
@ -1356,30 +1354,26 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
} }
} }
if (export_plugins[i]->skipped) { for (int j = 0; j < export_plugins[i]->extra_files.size(); j++) {
do_export = false; err = save_proxy.save_file(p_udata, export_plugins[i]->extra_files[j].path, export_plugins[i]->extra_files[j].data, idx, total, enc_in_filters, enc_ex_filters, key, seed);
skip_all = true; if (err != OK) {
skipped_i = i; return err;
break; }
} if (export_plugins[i]->extra_files[j].remap) {
} do_export = false; // If remap, do not.
path_remaps.push_back(path);
for (int i = 0; i <= skipped_i; i++) { path_remaps.push_back(export_plugins[i]->extra_files[j].path);
if (!skip_all) {
for (const EditorExportPlugin::ExtraFile &extra_file : export_plugins[i]->extra_files) {
err = save_proxy.save_file(p_udata, extra_file.path, extra_file.data, idx, total, enc_in_filters, enc_ex_filters, key, seed);
if (err != OK) {
return err;
}
if (extra_file.remap) {
do_export = false; // If remap, do not.
path_remaps.push_back(path);
path_remaps.push_back(extra_file.path);
}
} }
} }
if (export_plugins[i]->skipped) {
do_export = false;
}
export_plugins.write[i]->_clear(); export_plugins.write[i]->_clear();
if (!do_export) {
break;
}
} }
if (!do_export) { if (!do_export) {
continue; continue;