Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow skipping imported resource files from export #90365

Merged
merged 1 commit into from
May 30, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Apr 7, 2024

Fixes #67844 (it technically resolves the issue in a different way)

Imported resources go through a different code path, so _export_file() is not called for them. However they have a separate customization code, so I just allowed to use skip() when customizing to skip the resource.

The only problem is that customization has some cache, so the skip may be ignored if the file was cached and customization does not modify it. But it still at least makes it possible to skip these files, so that's good enough perhaps.

@KoBeWi KoBeWi added this to the 4.3 milestone Apr 7, 2024
@KoBeWi KoBeWi requested a review from a team as a code owner April 7, 2024 21:33
@KoBeWi KoBeWi force-pushed the export_any%_speedrun branch from 40e6e66 to 398892c Compare April 8, 2024 10:26
@akien-mga akien-mga merged commit 53bd0d5 into godotengine:master May 30, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@allenwp
Copy link
Contributor

allenwp commented Jul 2, 2024

I recently made a docs PR to describe the behaviour of _export_file and it seemed wrong to believe the design intent for this user-facing scripting API was to exclude imported resources, while including all other resources. It was a little tricky for me to wrap my head around which files are called in which EditorExportPlugin functions without some trial-and-error.

Additionally, there is a (possibly extremely minor) issue when skipping scenes in _customize_scene.

All this got me thinking about whether this PR really is the proper fix for the original issue regarding imported resources not being included in _export_file calls. Is it possible that something a little like this could be the solution for this issue instead of allowing skipping during the customize resource/scenes calls? I believe that the API would be a bit more reasonable if skipping was only performed in _export_file and all files were included in _export_file.

My branch is something I put together in 10 minutes, so I expect there are some issues with it; my intent is just to describe the sort of change I'm proposing.

@KoBeWi
Copy link
Member Author

KoBeWi commented Jul 2, 2024

tbh this is what I wanted to do at first, I just wasn't sure how and went with a simpler solution. I tested your commit and it correctly skips files, so you can open a PR.

allenwp added a commit to allenwp/godot that referenced this pull request Jul 2, 2024
This behaviour was introduced in godotengine#90365. This also fixes some inconsistencies in the docs and adds clarification of how the _export_file function works.
@allenwp
Copy link
Contributor

allenwp commented Jul 2, 2024

tbh this is what I wanted to do at first, I just wasn't sure how and went with a simpler solution. I tested your commit and it correctly skips files, so you can open a PR.

Thanks! I'm working on the new PR now.

takethebait pushed a commit to takethebait/godot that referenced this pull request Jul 3, 2024
This behaviour was introduced in godotengine#90365. This also fixes some inconsistencies in the docs and adds clarification of how the _export_file function works.
sorascode pushed a commit to sorascode/godot-soras-version that referenced this pull request Jul 22, 2024
This behaviour was introduced in godotengine#90365. This also fixes some inconsistencies in the docs and adds clarification of how the _export_file function works.
Luis-Wong pushed a commit to Luis-Wong/godot that referenced this pull request Jul 26, 2024
This behaviour was introduced in godotengine#90365. This also fixes some inconsistencies in the docs and adds clarification of how the _export_file function works.
2nafish117 pushed a commit to 2nafish117/godot that referenced this pull request Aug 5, 2024
This behaviour was introduced in godotengine#90365. This also fixes some inconsistencies in the docs and adds clarification of how the _export_file function works.
chryan pushed a commit to chryan/godot that referenced this pull request Aug 6, 2024
This behaviour was introduced in godotengine#90365. This also fixes some inconsistencies in the docs and adds clarification of how the _export_file function works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EditorExportPlugin._export_file is not called for many file types
4 participants