Merge pull request #17116 from poke1024/fix16734

Fix round preview getting square on "run scene" (issue 16734)
This commit is contained in:
Rémi Verschelde 2018-03-13 13:33:51 +01:00 committed by GitHub
commit 401a39f57e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -984,6 +984,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
String file = cache_base + ".png";
post_process_preview(img);
img->save_png(file);
}

View file

@ -40,7 +40,7 @@
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
static void post_process_preview(Ref<Image> p_image) {
void post_process_preview(Ref<Image> p_image) {
if (p_image->get_format() != Image::FORMAT_RGBA8)
p_image->convert(Image::FORMAT_RGBA8);

View file

@ -33,6 +33,8 @@
#include "editor/editor_resource_preview.h"
void post_process_preview(Ref<Image> p_image);
class EditorTexturePreviewPlugin : public EditorResourcePreviewGenerator {
GDCLASS(EditorTexturePreviewPlugin, EditorResourcePreviewGenerator)
public: