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 post-import plugins to modify _subresources #100792

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

Conversation

lyuma
Copy link
Contributor

@lyuma lyuma commented Dec 24, 2024

The old ResourceImporterScene::import code fetched some data before the EditorScenePostImportPlugin._pre_process callback. While the callback could modify existing keys, this prevented users from adding new data on a fresh import.

By fetching the keys after pre_process, this means users can consistently modify import options for nodes, meshes, materials and animations in a post-import plugin.

EDIT: Marking it as a bug, because the old behavior was quite inconsistent and I this change doesn't affect any user-facing APIs. If the user had previously opened the advanced importer, then scripts can modify subresources. This change makes it so it always reads the _subresources keys after _pre_process regardless of whether they existed before.

The old code fetched some data before the `EditorScenePostImportPlugin._pre_process` callback.
While the callback could modify existing keys, this prevented users from adding new data on a fresh import.

By fetching the keys after pre_process, this means users can consistently modify import options for nodes, meshes, materials and animations in a post-import plugin.
@lyuma lyuma requested review from a team as code owners December 24, 2024 15:38
@lyuma lyuma added this to the 4.4 milestone Dec 24, 2024
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.

Unable to assign Skeleton with Import Script
1 participant