Fix overriding _export_begin, _export_file and _export_end from GDExtension
(cherry picked from commit d09843c5ae
)
This commit is contained in:
parent
4734295fd1
commit
113cfdfc69
|
@ -497,7 +497,7 @@ EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_pla
|
||||||
//initial export plugin callback
|
//initial export plugin callback
|
||||||
for (int i = 0; i < export_plugins.size(); i++) {
|
for (int i = 0; i < export_plugins.size(); i++) {
|
||||||
export_plugins.write[i]->set_export_preset(p_preset);
|
export_plugins.write[i]->set_export_preset(p_preset);
|
||||||
if (export_plugins[i]->get_script_instance()) { //script based
|
if (GDVIRTUAL_IS_OVERRIDDEN_PTR(export_plugins[i], _export_begin)) {
|
||||||
PackedStringArray features_psa;
|
PackedStringArray features_psa;
|
||||||
for (const String &feature : features) {
|
for (const String &feature : features) {
|
||||||
features_psa.push_back(feature);
|
features_psa.push_back(feature);
|
||||||
|
@ -512,7 +512,7 @@ EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_pla
|
||||||
EditorExportPlatform::ExportNotifier::~ExportNotifier() {
|
EditorExportPlatform::ExportNotifier::~ExportNotifier() {
|
||||||
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
||||||
for (int i = 0; i < export_plugins.size(); i++) {
|
for (int i = 0; i < export_plugins.size(); i++) {
|
||||||
if (export_plugins[i]->get_script_instance()) {
|
if (GDVIRTUAL_IS_OVERRIDDEN_PTR(export_plugins[i], _export_end)) {
|
||||||
export_plugins.write[i]->_export_end_script();
|
export_plugins.write[i]->_export_end_script();
|
||||||
}
|
}
|
||||||
export_plugins.write[i]->_export_end();
|
export_plugins.write[i]->_export_end();
|
||||||
|
@ -1222,7 +1222,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
|
||||||
|
|
||||||
bool do_export = true;
|
bool do_export = true;
|
||||||
for (int i = 0; i < export_plugins.size(); i++) {
|
for (int i = 0; i < export_plugins.size(); i++) {
|
||||||
if (export_plugins[i]->get_script_instance()) { //script based
|
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);
|
||||||
} else {
|
} else {
|
||||||
export_plugins.write[i]->_export_file(path, type, features);
|
export_plugins.write[i]->_export_file(path, type, features);
|
||||||
|
|
Loading…
Reference in New Issue