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 disabling per-filetype ImageFormatLoader import #99666

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

Conversation

Spartan322
Copy link
Contributor

@Spartan322 Spartan322 commented Nov 25, 2024

This was the simplest way I could conceive of to address #69085 (comment), this would pave the way to restore functional DDS runtime image loading without the import process messing them up. If should_import() returns false then it'll be skipped for ImageLoader::get_recognized_extensions() when p_import is true. (which is every case that function is called except for Particles2DEditorPlugin's constructor from what I can see)

@Spartan322 Spartan322 requested review from a team as code owners November 25, 2024 07:45
@RandomShaper
Copy link
Member

I'm not sure this is the right approach.

If I'm understanding correctly, the issue here is we need a list of all the extensions corresponding to image types the engine will load succesfully. Wouldn't just asking that to the ResourceFormatImporter with the right resource type work?

@RandomShaper
Copy link
Member

Closed by accident due to my mouse pointer drifting for a second.

@Spartan322
Copy link
Contributor Author

Spartan322 commented Nov 25, 2024

I'm not sure this is the right approach.

Yeah I am still unsure myself coming up with it, I'm trying to ponder what would make the best solution but this was the least involved I could think of.

Wouldn't just asking that to the ResourceFormatImporter with the right resource type work?

I'm not sure how it could do that since the importers don't have any way to distinguish what should and shouldn't be imported for filetypes (all they care about is that it has an ImageFormatLoader) which is where the issue lies as DDS files would still be some form of a texture resource type, it can only figure that out based on the extensions given by ImageLoader::get_recognized_extensions. And since there isn't really anything that distinguishes the filetypes for the importers outside the extensions, I'm not sure how it be expected to pass the respective ImageFormatLoader to be called by an importer.

@Spartan322 Spartan322 requested a review from a team as a code owner November 25, 2024 18:50
@Spartan322 Spartan322 changed the title Add support for disabling per-filetype ImageLoader import Add support for disabling per-filetype ImageFormatLoader import Nov 25, 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.

4 participants