diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 22:36:57 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 22:36:57 +0100 |
commit | 9ec7aadc06c5c6410839e21d26956579d0628728 (patch) | |
tree | f778a87753266d9f7870fbb7fe8dfe38d2277d7a /editor | |
parent | c9e0d787fe49af72fcf84d6a54c073985d8a1851 (diff) | |
parent | ebf86c96e9b648ce1f7d654032e21d4aa84b8985 (diff) |
Merge pull request #66017 from Mickeon/rename-image-copy-rect
Rename Image's `get_rect` to `get_region`
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/resource_importer_layered_texture.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index ab15aa4fdc..9adabfb5d1 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -368,7 +368,7 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const for (int j = 0; j < hslices; j++) { int x = slice_w * j; int y = slice_h * i; - Ref<Image> slice = image->get_rect(Rect2i(x, y, slice_w, slice_h)); + Ref<Image> slice = image->get_region(Rect2i(x, y, slice_w, slice_h)); ERR_CONTINUE(slice.is_null() || slice->is_empty()); if (slice->get_width() != slice_w || slice->get_height() != slice_h) { slice->resize(slice_w, slice_h); diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 997dc0b2b5..5f9446c3b1 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -93,7 +93,7 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const Ref<Resource> &p_from, return Ref<Texture2D>(); } - img = atlas->get_rect(atex->get_region()); + img = atlas->get_region(atex->get_region()); } else { Ref<Texture2D> tex = p_from; if (tex.is_valid()) { |