summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-07 19:38:42 +0100
committerGitHub <noreply@github.com>2018-12-07 19:38:42 +0100
commitbb4d02e41a6c826360e8f270718cfd32b7bb1305 (patch)
treebc2a5d200d525899fa9d30a0314ea3794e2cd1e0
parent19f2a188bb305c4a446f63a0b5417086b7261514 (diff)
parent3daf1a8744a67a8f290c45a27d3079e3f241c6f4 (diff)
Merge pull request #23693 from marcelofg55/post_export_command
EditorExportPlugin now calls _export_end() when export ends if scripted
-rw-r--r--editor/editor_export.cpp10
-rw-r--r--editor/editor_export.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 209a006a06..1639369214 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -546,6 +546,13 @@ void EditorExportPlugin::_export_begin_script(const PoolVector<String> &p_featur
}
}
+void EditorExportPlugin::_export_end_script() {
+
+ if (get_script_instance()) {
+ get_script_instance()->call("_export_end");
+ }
+}
+
void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {
}
@@ -606,6 +613,9 @@ EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_pla
EditorExportPlatform::ExportNotifier::~ExportNotifier() {
Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins();
for (int i = 0; i < export_plugins.size(); i++) {
+ if (export_plugins[i]->get_script_instance()) {
+ export_plugins.write[i]->_export_end_script();
+ }
export_plugins.write[i]->_export_end();
}
}
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 380b33cd17..483af489a3 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -291,6 +291,7 @@ class EditorExportPlugin : public Reference {
void _export_file_script(const String &p_path, const String &p_type, const PoolVector<String> &p_features);
void _export_begin_script(const PoolVector<String> &p_features, bool p_debug, const String &p_path, int p_flags);
+ void _export_end_script();
protected:
void add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap);