summaryrefslogtreecommitdiff
path: root/editor/plugins/editor_preview_plugins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/editor_preview_plugins.cpp')
-rw-r--r--editor/plugins/editor_preview_plugins.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 235ccb18cb..a233d66d82 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -174,7 +174,7 @@ Ref<Texture2D> EditorImagePreviewPlugin::generate(const RES &p_from, const Size2
post_process_preview(img);
Ref<ImageTexture> ptex;
- ptex.instance();
+ ptex.instantiate();
ptex->create_from_image(img);
return ptex;
@@ -219,7 +219,7 @@ Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size
}
Ref<Image> img;
- img.instance();
+ img.instantiate();
img->create(bm->get_size().width, bm->get_size().height, false, Image::FORMAT_L8, data);
if (img->is_compressed()) {
@@ -278,7 +278,7 @@ Ref<Texture2D> EditorPackedScenePreviewPlugin::generate_from_path(const String &
}
Ref<Image> img;
- img.instance();
+ img.instantiate();
Error err = img->load(path);
if (err == OK) {
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
@@ -501,7 +501,7 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
int line = 0;
int col = 0;
Ref<Image> img;
- img.instance();
+ img.instantiate();
int thumbnail_size = MAX(p_size.x, p_size.y);
img->create(thumbnail_size, thumbnail_size, false, Image::FORMAT_RGBA8);
@@ -688,7 +688,7 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
Ref<Image> image;
- image.instance();
+ image.instantiate();
image->create(w, h, false, Image::FORMAT_RGB8, img);
ptex->create_from_image(image);
return ptex;
@@ -881,7 +881,7 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path,
if (res->is_class("Font")) {
sampled_font = res->duplicate();
} else if (res->is_class("FontData")) {
- sampled_font.instance();
+ sampled_font.instantiate();
sampled_font->add_data(res->duplicate());
}