[3.x] Allow disabling the alpha trim on texture atlas creation. #57165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3.x version of #57163
When creating an AtlasTexture, godot automatically removes unused pixels from the borders of the images. This is unexpected behaviour that changes the size of the texture. In general, if a developer asks for a texture of a specific size with transparent pixels in it, that's what the developer should get. Changing the size and contents of the texture can cause a plethora of issues.
For our project, this broke all of our styleboxes, as they had region's specified which were invalid because the size of the texture changes.
This PR creates an option for AtlasTexture importers to allow developers to enable the trim on transparent pixels on the borders. It defaults to Off, which I think is better, more expected behaviour. [ Edit - now it default to On to maintain compatibility ]
Related: #53390