MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _export_all

Method _export_all

editor/export/project_export.cpp:1390–1431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1388}
1389
1390void ProjectExportDialog::_export_all(bool p_debug) {
1391 exporting = true;
1392 bool show_dialog = false;
1393
1394 { // Scope for the editor progress, we must free it before showing the dialog at the end.
1395 String export_target = p_debug ? TTR("Debug") : TTR("Release");
1396 EditorProgress ep("exportall", TTR("Exporting All") + " " + export_target, EditorExport::get_singleton()->get_export_preset_count(), true);
1397
1398 result_dialog_log->clear();
1399 for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
1400 Ref<EditorExportPreset> preset = EditorExport::get_singleton()->get_export_preset(i);
1401 if (preset.is_null()) {
1402 exporting = false;
1403 ERR_FAIL_MSG("Failed to start the export: one of the presets is invalid.");
1404 }
1405
1406 Ref<EditorExportPlatform> platform = preset->get_platform();
1407 if (platform.is_null()) {
1408 exporting = false;
1409 ERR_FAIL_MSG("Failed to start the export: one of the presets has no valid platform.");
1410 }
1411
1412 ep.step(preset->get_name(), i);
1413
1414 platform->clear_messages();
1415 preset->update_value_overrides();
1416 Error err = platform->export_project(preset, p_debug, preset->get_export_path(), 0);
1417 if (err == ERR_SKIP) {
1418 exporting = false;
1419 return;
1420 }
1421 bool has_messages = platform->fill_log_messages(result_dialog_log, err);
1422 show_dialog = show_dialog || has_messages;
1423 }
1424 }
1425
1426 if (show_dialog) {
1427 result_dialog->popup_centered_ratio(0.5);
1428 }
1429
1430 exporting = false;
1431}
1432
1433void ProjectExportDialog::_bind_methods() {
1434 ClassDB::bind_method("set_export_path", &ProjectExportDialog::set_export_path);

Callers

nothing calls this directly

Calls 14

TTRFunction · 0.85
get_platformMethod · 0.80
clear_messagesMethod · 0.80
fill_log_messagesMethod · 0.80
popup_centered_ratioMethod · 0.80
clearMethod · 0.45
get_export_presetMethod · 0.45
is_nullMethod · 0.45
stepMethod · 0.45
get_nameMethod · 0.45

Tested by

no test coverage detected