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

Bind EditorFileSystem::reimport_files and improve docs #61004

Merged
merged 1 commit into from
May 17, 2022

Conversation

lyuma
Copy link
Contributor

@lyuma lyuma commented May 13, 2022

reimport_files offers a way for scripts to modify imported resources directly.
For example, images, sounds or glTF documents which are written by an external program.

It is much faster than scan, and can allow scripts to synchronously proceed after import finishes. This also gives a nice way to modify resources without hitting the reentrancy bug #46893, since I can set a boolean to true before the call to reimport_files and set it to false afterwards, or simply drive the import process in a single function without using asynchronous methods.

I'm using this in Unidot-Importer to import .jpg/.png images, .gltf documents and sound files such .wav/.mp3/.ogg and it seems to be very fast and pleasant to use, both firing a signal and returning when complete.

This function was probably intended to be public, given that its name does not begin with an underscore.

@lyuma lyuma force-pushed the reimport_files branch 2 times, most recently from b254b19 to f48898b Compare May 17, 2022 06:53
reimport_files offers a way for scripts to modify imported resources directly.
For example, images, sounds or glTF documents which are written by an external program.

It is much faster than `scan`, and can allow scripts to synchronously proceed after import finishes.
@akien-mga akien-mga merged commit 4379383 into godotengine:master May 17, 2022
@akien-mga
Copy link
Member

Thanks!

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.

3 participants