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

Expose EditorExport through the EditorInterface singleton #98251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

allenwp
Copy link
Contributor

@allenwp allenwp commented Oct 16, 2024

Exposes EditorExport through the EditorInterface singleton. Also exposes functions relating to feature tags of platforms and presets, similar to the existing EditorExportPreset.get_custom_features() function.

Background
Many properties of EditorExportPlatform EditorExportPreset and have been exposed in #90782, but it is currently not possible to iterate through these in some types of editor plugins and tools. Many of the newly exposed properties could be used in editor tools, such as my Resource Remaps plugin, which loads custom and platform feature tags.

Related PRs
Feature tags in scripting: #86747

Implementation
I have kept the scripting API similar to the C++ API, but that does mean there are some style differences between getting custom features (existing function that returns a comma delimited String) and getting the platform/preset features (new functions that return a TypedArray<String>).

@allenwp allenwp requested review from a team as code owners October 16, 2024 21:25
@allenwp allenwp force-pushed the Expose-EditorExport-through-EditorInterface branch from 13e996f to e501c12 Compare October 16, 2024 22:03
@fire fire requested review from a team and removed request for a team October 17, 2024 04:26
@Chaosus Chaosus added this to the 4.4 milestone Oct 17, 2024
@AThousandShips AThousandShips changed the title Exposed EditorExport through the EditorInterface singleton Expose EditorExport through the EditorInterface singleton Oct 17, 2024
Also exposed functions relating to feature tags of platforms and presets.
@groud
Copy link
Member

groud commented Dec 4, 2024

The feature looks quite interesting to me, but for our use case, we would have liked to be able to add a new export preset too. We are working on the editor plugin for a specific platform that requires specific parameters in the export menu, so it would have been great if we were able to create this preset automatically, instead of requiring the users to create the preset themselves.

@allenwp
Copy link
Contributor Author

allenwp commented Dec 4, 2024

The feature looks quite interesting to me, but for our use case, we would have liked to be able to add a new export preset too. We are working on the editor plugin for a specific platform that requires specific parameters in the export menu, so it would have been great if we were able to create this preset automatically, instead of requiring the users to create the preset themselves.

You're welcome to use this PR as a starting point for the functions you need!

The documentation is what I spent the most time on with this PR, so please feel free to grab that if you use any of this. The rest is pretty mindless exposing of existing functions to the ClassDB

@citizenll
Copy link
Contributor

I think this feature is very useful. In addition, more set methods should be exported in the preset; currently, only the get methods have been exported(I am currently creating custom pck subpackages by modifying the preset).
image

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.

4 participants