Add thumbnails to LargeTexture
This commit is contained in:
@ -86,6 +86,7 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2
|
||||
|
||||
Ref<Image> img;
|
||||
Ref<AtlasTexture> atex = p_from;
|
||||
Ref<LargeTexture> ltex = p_from;
|
||||
if (atex.is_valid()) {
|
||||
Ref<Texture> tex = atex->get_atlas();
|
||||
if (!tex.is_valid()) {
|
||||
@ -93,6 +94,8 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2
|
||||
}
|
||||
Ref<Image> atlas = tex->get_data();
|
||||
img = atlas->get_rect(atex->get_region());
|
||||
} else if (ltex.is_valid()) {
|
||||
img = ltex->to_image();
|
||||
} else {
|
||||
Ref<Texture> tex = p_from;
|
||||
img = tex->get_data();
|
||||
|
||||
Reference in New Issue
Block a user