From 4edc22ee6ed62672aa078813c7e0d1ff94149aee Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Thu, 29 Jun 2023 16:03:20 +0200 Subject: [PATCH] Use nearest with mipmaps texture filter in SpriteFrames editor plugin (cherry picked from commit 2edf1bd76a1c74cfa28c1ff3d608bf7fc4504ea5) --- editor/plugins/sprite_frames_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index da487c34a86..42a05d8825d 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -1735,6 +1735,7 @@ SpriteFramesEditor::SpriteFramesEditor() { frame_list = memnew(ItemList); frame_list->set_v_size_flags(SIZE_EXPAND_FILL); frame_list->set_icon_mode(ItemList::ICON_MODE_TOP); + frame_list->set_texture_filter(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); frame_list->set_max_columns(0); frame_list->set_icon_mode(ItemList::ICON_MODE_TOP); @@ -1883,6 +1884,7 @@ SpriteFramesEditor::SpriteFramesEditor() { split_sheet_preview = memnew(TextureRect); split_sheet_preview->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE); + split_sheet_preview->set_texture_filter(TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); split_sheet_preview->set_mouse_filter(MOUSE_FILTER_PASS); split_sheet_preview->connect("draw", callable_mp(this, &SpriteFramesEditor::_sheet_preview_draw)); split_sheet_preview->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_sheet_preview_input));