diff options
author | kobewi <kobewi4e@gmail.com> | 2024-04-07 23:28:52 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2024-04-08 12:26:24 +0200 |
commit | 398892ccc01cec724c5f4c9cdfd0fb7e746a0fa7 (patch) | |
tree | a9df9840ab02f60c20d020f15f2276d72b20188a /editor | |
parent | e5b4ef8e9522e950033cbece39a31a4a76da19c1 (diff) | |
download | redot-engine-398892ccc01cec724c5f4c9cdfd0fb7e746a0fa7.tar.gz |
Allow skipping imported resource files from export
Diffstat (limited to 'editor')
-rw-r--r-- | editor/export/editor_export_platform.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index d2a187bcfd..509bb70782 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -791,6 +791,10 @@ String EditorExportPlatform::_export_customize(const String &p_path, LocalVector if (!customize_scenes_plugins.is_empty()) { for (Ref<EditorExportPlugin> &plugin : customize_scenes_plugins) { Node *customized = plugin->_customize_scene(node, p_path); + if (plugin->skipped) { + plugin->_clear(); + return String(); + } if (customized != nullptr) { node = customized; modified = true; @@ -824,6 +828,10 @@ String EditorExportPlatform::_export_customize(const String &p_path, LocalVector if (!customize_resources_plugins.is_empty()) { for (Ref<EditorExportPlugin> &plugin : customize_resources_plugins) { Ref<Resource> new_res = plugin->_customize_resource(res, p_path); + if (plugin->skipped) { + plugin->_clear(); + return String(); + } if (new_res.is_valid()) { modified = true; if (new_res != res) { @@ -1139,6 +1147,10 @@ Error EditorExportPlatform::export_project_files(bool p_main_pack, const Ref<Edi // Before doing this, try to see if it can be customized. String export_path = _export_customize(path, customize_resources_plugins, customize_scenes_plugins, export_cache, export_base_path, false); + if (export_path.is_empty()) { + // Skipped from plugin. + continue; + } if (export_path != path) { // It was actually customized. |