-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Expose Image::get_mipmap_count()
and add GLTFState::get_source_images()
#79368
base: master
Are you sure you want to change the base?
Expose Image::get_mipmap_count()
and add GLTFState::get_source_images()
#79368
Conversation
Also remember to squash your commits into one, see https://docs.godotengine.org/en/latest/contributing/workflow/pr_workflow.html#the-interactive-rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lyuma looks good to me, but you wanted the type changed to TypedArray? Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously I suggested removing source_images since it was not used very much, but it was decided to keep it. Since we are keeping source_images in the engine, it makes sense to expose getting it. As for mipmap I can't speak for that but it looks good to me too.
I would rather hold off on exposing From what I see, the only purpose behind It would be nice to have a way of preserving images more precisely on export without compression artifacts (for example, referencing the originally imported .png or .jpg from the project filesystem) but I think that should be done a different way. @aaronfranke do you have a reference to the discussion that "we are keeping source_images in the engine"? I don't understand how it is intended to be used, nor how it avoids texture compression artifacts (keeping the actual source images). |
Regarding |
Image::get_mipmap_count()
and add GLTFState::get_source_images()
Note that when a consensus is reached, the commits should be squashed. The documentation should be added in the same commit that exposes the methods. But I guess we might hold off on merging to see if #74142 gets merged first, and the discussion about |
I noticed that
Image::get_mipmap_count()
andGLTFState::source_images
were not exposed to GDScript. First one can be quite useful for plugins that are displaying Image information etc. Second one is performance related and allows to access GLTF source images without the need of copying it from an ImageTexture. Very useful for batch tasks on GLTF files (e.g conversions)