You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fix pixelized previews, but also instances of breaking ImageTexture cache. Closes #25378.
This commit is contained in:
@@ -99,12 +99,14 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2
|
||||
} else {
|
||||
Ref<Texture> tex = p_from;
|
||||
img = tex->get_data();
|
||||
if (img.is_valid()) {
|
||||
img = img->duplicate();
|
||||
}
|
||||
}
|
||||
|
||||
if (img.is_null() || img->empty())
|
||||
return Ref<Texture>();
|
||||
|
||||
img = img->duplicate();
|
||||
img->clear_mipmaps();
|
||||
|
||||
if (img->is_compressed()) {
|
||||
|
||||
Reference in New Issue
Block a user