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

Split editor-specific import metadata for textures #75949

Merged
merged 1 commit into from
May 27, 2023

Conversation

YuriSizov
Copy link
Contributor

The issue right now is that we need to store current values of editor settings for comparison, so we can invalidate the imported texture and reimport it. I used the *.import file, where we already store some metadata and for which we have the necessary scaffolding to read and write.

Unfortunately, this was a bad idea, as the values are of course different for different users and systems, and storing them like I did introduces unnecessary changes to the *.import file, which should be system-independent, and which is included into version control.

So this PR addresses the issue by splitting these editor-specific metadata properties from the rest and storing them in the .godot/imported folder, alongside the texture itself. The file is created and loaded only if you import a texture for editor use. Existing projects will receive an error, urging them to reimport the file. I could've added some fallback logic to read from the old place just in case, but I think it's better to just reimport the texture and be done with it.

Code_2023-04-11_20-24-45

Copy link
Member

@SaracenOne SaracenOne left a comment

Choose a reason for hiding this comment

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

Tested and looks good to me! 👍

@akien-mga
Copy link
Member

I'd suggest a rebase for good measure (last rebase over a month ago), then it can be merged.

@YuriSizov
Copy link
Contributor Author

Done!

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