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

Add support for scene/resource customization in export plugins #65135

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

reduz
Copy link
Member

@reduz reduz commented Aug 31, 2022

EditorExportPlugin adds a set of callbacks to allow customizing scenes, resources or subresources in all files exported:

  • Can take scene files, resource files and subresources in all of them.
  • Allows any degree of customization to any file during export.
  • Uses a cache for the converted files if nothing changes, so this work only happens if a file is modified.
  • Uses hashing to differentiate export configuration caches.
  • Removed the previous conversion code to binary, as this one uses existing stuff.

This API is useful in several scenarios:

  • Needed by the "server" export platform to get rid of textures, meshes, audio, etc.
  • Needed by text to binary converters.
  • Needed by eventual optimizations such as shader precompiling on export, mesh merging and optimization, etc.

Obligatory screenshot of API:
image

This is a draft, feedback is very welcome.. Should be ready for review now.

@reduz reduz requested review from a team as code owners August 31, 2022 09:20
@reduz reduz marked this pull request as draft August 31, 2022 09:20
@reduz reduz force-pushed the export-customization-plugins branch 2 times, most recently from 92ea01b to d6317d1 Compare August 31, 2022 10:06
@YuriSizov YuriSizov added this to the 4.0 milestone Aug 31, 2022
@reduz reduz force-pushed the export-customization-plugins branch from d6317d1 to c91072b Compare August 31, 2022 12:34
@reduz reduz marked this pull request as ready for review August 31, 2022 12:35
@reduz reduz requested a review from a team as a code owner August 31, 2022 12:35
@reduz reduz force-pushed the export-customization-plugins branch 2 times, most recently from 9745534 to bfc8a7f Compare September 1, 2022 08:00
@reduz
Copy link
Member Author

reduz commented Sep 1, 2022

This should be good now (tested it locally).

doc/classes/EditorExportPlugin.xml Show resolved Hide resolved
doc/classes/EditorExportPlatform.xml Show resolved Hide resolved
doc/classes/ConfigFile.xml Outdated Show resolved Hide resolved
editor/export/editor_export_platform.cpp Outdated Show resolved Hide resolved
editor/export/editor_export_platform.cpp Outdated Show resolved Hide resolved
@reduz reduz force-pushed the export-customization-plugins branch from bfc8a7f to c20f54b Compare September 1, 2022 09:15
EditorExportPlugin adds a set of callbacks to allow customizing scenes, resources or subresources in all files exported:
* Can take scene files, resource files and subresources in all of them.
* Uses a cache for the converted files if nothing changes, so this work only happens if a file is modified.
* Uses hashing to differentiate export configuration caches.
* Removed the previous conversion code to binary, as this one uses existing stuff.

This API is useful in several scenarios:
* Needed by the "server" export platform to get rid of textures, meshes, audio, etc.
* Needed by text to binary converters.
* Needed by eventual optimizations such as shader precompiling on export, mesh merging and optimization, etc.

This is a draft, feedback is very welcome.
@reduz reduz force-pushed the export-customization-plugins branch from c20f54b to ef17c46 Compare September 1, 2022 09:16
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@akien-mga akien-mga merged commit 181019c into godotengine:master Sep 1, 2022
@akien-mga
Copy link
Member

Thanks!

@gb2dev
Copy link
Contributor

gb2dev commented Sep 11, 2022

This causes #56343 for all scene preloads.

@legendiguess
Copy link

legendiguess commented Dec 19, 2023

Will this be backported to 3.x?

@Calinou
Copy link
Member

Calinou commented Dec 19, 2023

Will this be backported to 3.x?

This relies on a lot of core refactoring done in 4.0 (most of which is backwards-incompatible), so no. This would need to be redone from scratch by a motivated contributor, and even then, it's not guaranteed to be merged for 3.6.

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.

6 participants