summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-12 23:11:51 +0100
committerGitHub <noreply@github.com>2021-02-12 23:11:51 +0100
commit5011a2273123be57093cff1cdf00a660169f90ab (patch)
treefe459bc7424530cb4032d9c9636bee4913c4dcbf /editor/plugins
parent4a0dbf9acf19e64106b98ec772f59f9c0ec6dbe8 (diff)
parent1cd7a16c100e8b4f9a4a7e898ae5e0aad61718fb (diff)
Merge pull request #45932 from goostengine/sprite-convert-compressed
Fix sprite editor conversion tools to handle compressed textures
Diffstat (limited to 'editor/plugins')
-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();