diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-03 14:04:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-03 14:04:11 +0100 |
commit | a58c3fb4b7a9efa23546b71b4875360d7c8fc27d (patch) | |
tree | 4a3fefa8077febccba5454b848b5d1c1da43d684 /editor/plugins | |
parent | 6b1c3d63106f9ef32ccb42b1f9429742f9a777be (diff) | |
parent | 163e0e3ebd4c7b74307fc1ccebbf7e12266f2cf6 (diff) |
Merge pull request #24736 from timoschwarzer/ltex-thumbnails
Add thumbnails to LargeTexture
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(); |