You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
editor: Fix AtlasTexture editor previews for compressed textures
This commit is contained in:
@@ -100,6 +100,13 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const Ref<Resource> &p_from,
|
||||
return Ref<Texture2D>();
|
||||
}
|
||||
|
||||
if (atlas->is_compressed()) {
|
||||
atlas = atlas->duplicate();
|
||||
if (atlas->decompress() != OK) {
|
||||
return Ref<Texture2D>();
|
||||
}
|
||||
}
|
||||
|
||||
if (!tex_atlas->get_region().has_area()) {
|
||||
return Ref<Texture2D>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user