From 1cd7a16c100e8b4f9a4a7e898ae5e0aad61718fb Mon Sep 17 00:00:00 2001 From: "Andrii Doroshenko (Xrayez)" Date: Fri, 12 Feb 2021 21:42:07 +0200 Subject: Fix sprite editor conversion tools to handle compressed textures --- editor/plugins/sprite_2d_editor_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'editor/plugins') diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp index 03ddaa2c74..4949d2b9b7 100644 --- a/editor/plugins/sprite_2d_editor_plugin.cpp +++ b/editor/plugins/sprite_2d_editor_plugin.cpp @@ -173,6 +173,11 @@ void Sprite2DEditor::_update_mesh_data() { Ref 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(); -- cgit v1.2.3