Selaa lähdekoodia

Fix sprite editor conversion tools to handle compressed textures

Andrii Doroshenko (Xrayez) 4 vuotta sitten
vanhempi
commit
1cd7a16c10
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      editor/plugins/sprite_2d_editor_plugin.cpp

+ 5 - 0
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();