Merge pull request #45932 from goostengine/sprite-convert-compressed

Fix sprite editor conversion tools to handle compressed textures
This commit is contained in:
Rémi Verschelde 2021-02-12 23:11:51 +01:00 committed by GitHub
commit 5011a22731
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,6 +173,11 @@ void Sprite2DEditor::_update_mesh_data() {
Ref<Image> image = texture->get_data();
ERR_FAIL_COND(image.is_null());
if (image->is_compressed()) {
image->decompress();
}
Rect2 rect;
if (node->is_region()) {
rect = node->get_region_rect();