summaryrefslogtreecommitdiffstats
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
authorRob Blanckaert <basicer@basicer.com>2024-08-28 20:34:46 -0700
committerRob Blanckaert <basicer@basicer.com>2024-09-01 15:17:49 -0700
commit28e7069ee00fac602ead03c4077efb3fdca21685 (patch)
tree8c8f39177602f93b96a3fac730ac44b11950bba5 /editor/editor_resource_preview.cpp
parentce8a837aab2568f9cdc41b4b410c478b0cd711fc (diff)
downloadredot-engine-28e7069ee00fac602ead03c4077efb3fdca21685.tar.gz
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.
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r--editor/editor_resource_preview.cpp4
1 files changed, 3 insertions, 1 deletions
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<ImageTexture> &r_texture, Ref<
r_small_texture->set_image(small_image);
}
- break;
+ if (generated.is_valid()) {
+ break;
+ }
}
if (!p_item.resource.is_valid()) {