From 5e6e17a3b2bd718fe7207cf988e099d649acd00e Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 20 Jan 2022 19:00:57 +0100 Subject: [PATCH] Remove rect y axis flipping code, as it's not needed here. (Both uvs and the gui is y+ down.) --- .../mesh_data_resource_editor/uv_editor/RectViewNode.gd | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/game/addons/mesh_data_resource_editor/uv_editor/RectViewNode.gd b/game/addons/mesh_data_resource_editor/uv_editor/RectViewNode.gd index 48b032fc..a00f6b7c 100644 --- a/game/addons/mesh_data_resource_editor/uv_editor/RectViewNode.gd +++ b/game/addons/mesh_data_resource_editor/uv_editor/RectViewNode.gd @@ -48,15 +48,11 @@ func refresh() -> void: if !_mdr: return - #anchor is bottom left here var rect : Rect2 = _base_rect rect.position *= _rect_scale rect.size *= _rect_scale - #anchor needs to be on top left here - var rp : Vector2 = rect.position - rp.y = edited_resource_parent_size.y * _rect_scale - rect.size.y - rect.position.y - rect_position = rp + rect_position = rect.position rect_size = rect.size update() @@ -233,7 +229,6 @@ func _gui_input(p_event : InputEvent) -> void: set_position(rect.position) #rect needs to be converted back - rect.position.y = edited_resource_parent_size.y * _rect_scale - rect.size.y - rect.position.y rect.position /= _rect_scale rect.size /= _rect_scale #edited_resource.set_rect(rect)