-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 images to be imported "for editor use" and respect editor settings #64938
Conversation
From RC:
I think we could add some sort of cache to EditorFileSystem that would track all textures imported with those flags and invalidate their cache if the relevant editor settings change. But I also think we can do it afterwards, as an enhancement. I'd like this to be included in the next alpha, before we're completely locked into beta. I can still fix the comment from @akien-mga and replace |
74bc3a8
to
8e1f6a4
Compare
@akien-mga I've pushed an attempt at making it static without a direct editor dependency as a separate commit. Let me know if this is better, then I can squash. And I hope at this point we'd be okay merging. 👀 I can work on improving this with a better, automatic reimporting on settings change later. |
8e1f6a4
to
4373cca
Compare
I am not able to do a proper review. Can defer to others. |
Looks good 👍 |
4373cca
to
817d4db
Compare
Thanks! |
Closes godotengine/godot-proposals#5034.
This is implemented pretty much as I've described in the proposal. There are now two new import options that let the SVG icons to be imported for editor use and either scale, or convert colors, or both. We still need to document somehow which colors do we use, and there are some other limitations to the color conversion logic as it is currently implemented. But scaling is straightforward.
One limitation which I don't know how to fix without dirty hacks in core is that if you change the polarity of the editor theme you need to restart the editor or manually reimport the image for it to update. Changing scale already requires a restart, so it's not a big deal. There is already a hacky thing in core resource importer, but it shouldn't be too bad because we sometimes allow
TOOLS_ENABLED
in core and I think in this case this is a valid need.Anyway, DEMO TIME!
godot.windows.tools.x86_64_2022-08-26_20-03-42.mp4
This work is kindly sponsored by the Dialogic project.