diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index ccaddbc0a8..8464dfd0aa 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -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(); |