From d2900429e81175a9f48240b180f1d8e3ab52865c Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 4 May 2022 01:49:20 +0200 Subject: Add static methods for creating Image and ImageTexture --- editor/plugins/curve_editor_plugin.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'editor/plugins/curve_editor_plugin.cpp') diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 654c92c532..66e58339ed 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -841,9 +841,5 @@ Ref CurvePreviewGenerator::generate(const Ref &p_from, cons prev_y = y; } - - Ref ptex = Ref(memnew(ImageTexture)); - - ptex->create_from_image(img_ref); - return ptex; + return ImageTexture::create_from_image(img_ref); } -- cgit v1.2.3