Added mirror and rotation buttons to the uv editor. They are not yet implemented.

This commit is contained in:
Relintai 2022-02-12 22:59:36 +01:00
parent e44e4c1366
commit e729a31803
9 changed files with 207 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon_h_mirror.png-c9b5d56c2156f7acd5e386f16839fcf5.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/mesh_data_resource_editor/icons/icon_h_mirror.png"
dest_files=[ "res://.import/icon_h_mirror.png-c9b5d56c2156f7acd5e386f16839fcf5.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=1
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon_rot_left.png-2ed07f01ee122a21258a76ad461d5351.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/mesh_data_resource_editor/icons/icon_rot_left.png"
dest_files=[ "res://.import/icon_rot_left.png-2ed07f01ee122a21258a76ad461d5351.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=1
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon_rot_right.png-3a55515ef21d5e1831970e70a893782c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/mesh_data_resource_editor/icons/icon_rot_right.png"
dest_files=[ "res://.import/icon_rot_right.png-3a55515ef21d5e1831970e70a893782c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=1
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon_v_mirror.png-e41ddad69d06b4e32f9d50b970311be7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/mesh_data_resource_editor/icons/icon_v_mirror.png"
dest_files=[ "res://.import/icon_v_mirror.png-e41ddad69d06b4e32f9d50b970311be7.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=1
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -1,8 +1,12 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://addons/mesh_data_resource_editor/uv_editor/RectEditor.gd" type="Script" id=1]
[ext_resource path="res://addons/mesh_data_resource_editor/widgets/EditorZoomWidget.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/mesh_data_resource_editor/uv_editor/RectView.gd" type="Script" id=3]
[ext_resource path="res://addons/mesh_data_resource_editor/icons/icon_v_mirror.png" type="Texture" id=4]
[ext_resource path="res://addons/mesh_data_resource_editor/icons/icon_h_mirror.png" type="Texture" id=5]
[ext_resource path="res://addons/mesh_data_resource_editor/icons/icon_rot_right.png" type="Texture" id=6]
[ext_resource path="res://addons/mesh_data_resource_editor/icons/icon_rot_left.png" type="Texture" id=7]
[node name="UVEditor" type="PanelContainer"]
anchor_right = 1.0
@ -33,9 +37,9 @@ margin_right = 650.0
margin_bottom = 650.0
rect_min_size = Vector2( 600, 600 )
script = ExtResource( 3 )
zoom_widget_path = NodePath("../../../Control/EditorZoomWidget")
zoom_widget_path = NodePath("../../../Control/HBoxContainer/EditorZoomWidget")
[node name="Control" type="Control" parent="."]
[node name="Control" type="VBoxContainer" parent="."]
margin_left = 7.0
margin_top = 7.0
margin_right = 1017.0
@ -44,12 +48,70 @@ mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="EditorZoomWidget" parent="Control" instance=ExtResource( 2 )]
[node name="HBoxContainer" type="HBoxContainer" parent="Control"]
margin_right = 1010.0
margin_bottom = 24.0
mouse_filter = 2
size_flags_horizontal = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="EditorZoomWidget" parent="Control/HBoxContainer" instance=ExtResource( 2 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 115.0
margin_bottom = 22.0
margin_bottom = 24.0
custom_constants/separation = -8
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VSeparator2" type="VSeparator" parent="Control/HBoxContainer"]
margin_left = 119.0
margin_right = 123.0
margin_bottom = 24.0
[node name="HorizontalMirror" type="Button" parent="Control/HBoxContainer"]
margin_left = 127.0
margin_right = 155.0
margin_bottom = 24.0
hint_tooltip = "Mirror the selected island horizontally.."
icon = ExtResource( 5 )
[node name="VerticalMirror" type="Button" parent="Control/HBoxContainer"]
margin_left = 159.0
margin_right = 187.0
margin_bottom = 24.0
hint_tooltip = "Mirror the selected island vertically."
icon = ExtResource( 4 )
[node name="VSeparator" type="VSeparator" parent="Control/HBoxContainer"]
margin_left = 191.0
margin_right = 195.0
margin_bottom = 24.0
[node name="RotLeft" type="Button" parent="Control/HBoxContainer"]
margin_left = 199.0
margin_right = 227.0
margin_bottom = 24.0
hint_tooltip = "Rotate left."
icon = ExtResource( 7 )
[node name="SpinBox" type="SpinBox" parent="Control/HBoxContainer"]
margin_left = 231.0
margin_right = 305.0
margin_bottom = 24.0
hint_tooltip = "Rotate amount in degrees."
max_value = 360.0
step = 0.0
value = 45.0
allow_greater = true
allow_lesser = true
[node name="RotRight" type="Button" parent="Control/HBoxContainer"]
margin_left = 309.0
margin_right = 337.0
margin_bottom = 24.0
hint_tooltip = "Rotate right."
icon = ExtResource( 6 )