소스 검색

Fix sprite editor conversion tools to handle compressed textures

(cherry picked from commit 1cd7a16c100e8b4f9a4a7e898ae5e0aad61718fb)
Andrii Doroshenko (Xrayez) 4 년 전
부모
커밋
329dcebc83
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      editor/plugins/sprite_editor_plugin.cpp

+ 5 - 0
editor/plugins/sprite_editor_plugin.cpp

@@ -182,6 +182,11 @@ void SpriteEditor::_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();