summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2021-02-12 21:42:07 +0200
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2021-02-12 21:42:07 +0200
commit1cd7a16c100e8b4f9a4a7e898ae5e0aad61718fb (patch)
treed20aee2e4e661ffb7211fe2bacffb017e0789113 /editor
parent5525cd85c60455b0bb9716bbef0ad2ad8111d752 (diff)
Fix sprite editor conversion tools to handle compressed textures
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
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> 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();