From 28e7069ee00fac602ead03c4077efb3fdca21685 Mon Sep 17 00:00:00 2001 From: Rob Blanckaert Date: Wed, 28 Aug 2024 20:34:46 -0700 Subject: Keep looking when a preview plugin returns an empty image. EditorResourcePreviewGenerator::_generate says that "Returning an empty texture is an OK way to fail and let another generator take care." This patch enables that behavior. --- editor/editor_resource_preview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editor/editor_resource_preview.cpp') diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 71865f7e8c..956fdc5cfa 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -221,7 +221,9 @@ void EditorResourcePreview::_generate_preview(Ref &r_texture, Ref< r_small_texture->set_image(small_image); } - break; + if (generated.is_valid()) { + break; + } } if (!p_item.resource.is_valid()) { -- cgit v1.2.3