Skip to content

Commit

Permalink
Merge pull request #45932 from goostengine/sprite-convert-compressed
Browse files Browse the repository at this point in the history
Fix sprite editor conversion tools to handle compressed textures
  • Loading branch information
akien-mga authored Feb 12, 2021
2 parents 4a0dbf9 + 1cd7a16 commit 5011a22
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/sprite_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5011a22

Please sign in to comment.