You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Rename instance()->instantiate() when it's a verb
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user