1- [gd_scene load_steps =4 format =3 uid ="uid://dmfusfaiojjvf" ]
1+ [gd_scene load_steps =6 format =3 uid ="uid://dmfusfaiojjvf" ]
22
33[ext_resource type ="PackedScene" uid ="uid://c2ns17avhb2nx" path ="res://material_maker/widgets/curve_edit/curve_editor.tscn" id ="1" ]
4- [ext_resource type ="Script" path ="res://material_maker/widgets/curve_edit/curve_dialog.gd" id ="2" ]
5- [ext_resource type ="Script" path ="res://material_maker/widgets/curve_edit/presets_selector.gd" id ="3" ]
4+ [ext_resource type ="Script" uid ="uid://06osuiqfmilt" path ="res://material_maker/widgets/curve_edit/curve_dialog.gd" id ="2" ]
5+ [ext_resource type ="Script" uid ="uid://pgn60kk5fcj6" path ="res://material_maker/widgets/curve_edit/settings_panel.gd" id ="2_fe25e" ]
6+ [ext_resource type ="Script" uid ="uid://df24muo083lfx" path ="res://material_maker/widgets/curve_edit/presets_selector.gd" id ="3" ]
7+ [ext_resource type ="PackedScene" uid ="uid://rflulhsuy3ax" path ="res://material_maker/widgets/float_edit/float_edit.tscn" id ="3_fe25e" ]
68
79[node name ="CurveDialog" type ="Window" ]
810title = "Edit curve"
11+ position = Vector2i (0 , 36 )
912size = Vector2i (300 , 300 )
1013exclusive = true
1114min_size = Vector2i (300 , 300 )
@@ -20,16 +23,107 @@ offset_top = 5.0
2023offset_right = -5.0
2124offset_bottom = -5.0
2225
26+ [node name ="CurveViewSettingsContainer" type ="MarginContainer" parent ="VBoxContainer" ]
27+ layout_mode = 2
28+ theme_override_constants/margin_left = 12
29+ theme_override_constants/margin_top = 4
30+
31+ [node name ="CurveViewSettings" type ="PanelContainer" parent ="VBoxContainer/CurveViewSettingsContainer" ]
32+ layout_mode = 2
33+ size_flags_horizontal = 0
34+ theme_type_variation = &"MM_PanelMenuBar"
35+ script = ExtResource ("2_fe25e" )
36+
37+ [node name ="HBoxContainer" type ="HBoxContainer" parent ="VBoxContainer/CurveViewSettingsContainer/CurveViewSettings" ]
38+ layout_mode = 2
39+ size_flags_horizontal = 0
40+
41+ [node name ="GridLabel" type ="Label" parent ="VBoxContainer/CurveViewSettingsContainer/CurveViewSettings/HBoxContainer" ]
42+ layout_mode = 2
43+ text = "Grid"
44+
45+ [node name ="GridDensity" parent ="VBoxContainer/CurveViewSettingsContainer/CurveViewSettings/HBoxContainer" instance =ExtResource ("3_fe25e" )]
46+ unique_name_in_owner = true
47+ layout_mode = 2
48+ value = 4.0
49+ min_value = 1.0
50+ max_value = 16.0
51+ step = 1.0
52+ float_only = true
53+
2354[node name ="EditorContainer" type ="MarginContainer" parent ="VBoxContainer" ]
2455clip_contents = true
2556layout_mode = 2
2657size_flags_horizontal = 3
2758size_flags_vertical = 3
59+ theme_override_constants/margin_left = 12
60+ theme_override_constants/margin_top = 12
61+ theme_override_constants/margin_right = 12
62+ theme_override_constants/margin_bottom = 12
2863
2964[node name ="CurveEditor" parent ="VBoxContainer/EditorContainer" instance =ExtResource ("1" )]
65+ unique_name_in_owner = true
3066layout_mode = 2
3167size_flags_vertical = 3
3268
69+ [node name ="ControlUIContainer" type ="VBoxContainer" parent ="VBoxContainer" ]
70+ custom_minimum_size = Vector2 (0 , 23 )
71+ layout_mode = 2
72+
73+ [node name ="ControlUI" type ="HBoxContainer" parent ="VBoxContainer/ControlUIContainer" ]
74+ unique_name_in_owner = true
75+ visible = false
76+ layout_mode = 2
77+ size_flags_horizontal = 4
78+
79+ [node name ="PositionLabel" type ="Label" parent ="VBoxContainer/ControlUIContainer/ControlUI" ]
80+ layout_mode = 2
81+ text = "Position"
82+
83+ [node name ="PositionX" parent ="VBoxContainer/ControlUIContainer/ControlUI" instance =ExtResource ("3_fe25e" )]
84+ unique_name_in_owner = true
85+ custom_minimum_size = Vector2 (70 , 0 )
86+ layout_mode = 2
87+ value = 1.0
88+ step = 0.01
89+ float_only = true
90+
91+ [node name ="PositionY" parent ="VBoxContainer/ControlUIContainer/ControlUI" instance =ExtResource ("3_fe25e" )]
92+ unique_name_in_owner = true
93+ custom_minimum_size = Vector2 (70 , 0 )
94+ layout_mode = 2
95+ value = 0.0
96+ step = 0.01
97+ float_only = true
98+
99+ [node name ="Spacer" type ="Control" parent ="VBoxContainer/ControlUIContainer/ControlUI" ]
100+ custom_minimum_size = Vector2 (12 , 0 )
101+ layout_mode = 2
102+
103+ [node name ="SlopeLabel" type ="Label" parent ="VBoxContainer/ControlUIContainer/ControlUI" ]
104+ layout_mode = 2
105+ text = "Handles"
106+
107+ [node name ="LeftSlope" parent ="VBoxContainer/ControlUIContainer/ControlUI" instance =ExtResource ("3_fe25e" )]
108+ unique_name_in_owner = true
109+ custom_minimum_size = Vector2 (70 , 0 )
110+ layout_mode = 2
111+ value = 0.0
112+ min_value = -89.0
113+ max_value = 89.0
114+ step = 0.1
115+ float_only = true
116+
117+ [node name ="RightSlope" parent ="VBoxContainer/ControlUIContainer/ControlUI" instance =ExtResource ("3_fe25e" )]
118+ unique_name_in_owner = true
119+ custom_minimum_size = Vector2 (70 , 0 )
120+ layout_mode = 2
121+ value = 45.0
122+ min_value = -89.0
123+ max_value = 89.0
124+ step = 0.1
125+ float_only = true
126+
33127[node name ="HSeparator" type ="HSeparator" parent ="VBoxContainer" ]
34128layout_mode = 2
35129
@@ -63,7 +157,16 @@ layout_mode = 2
63157text = "Cancel"
64158
65159[connection signal ="close_requested" from ="." to ="." method ="_on_Cancel_pressed" ]
160+ [connection signal ="ready" from ="VBoxContainer/CurveViewSettingsContainer/CurveViewSettings" to ="VBoxContainer/CurveViewSettingsContainer/CurveViewSettings" method ="_on_ready" ]
161+ [connection signal ="value_changed" from ="VBoxContainer/CurveViewSettingsContainer/CurveViewSettings/HBoxContainer/GridDensity" to ="VBoxContainer/CurveViewSettingsContainer/CurveViewSettings" method ="_on_grid_density_value_changed" ]
66162[connection signal ="value_changed" from ="VBoxContainer/EditorContainer/CurveEditor" to ="." method ="_on_CurveEditor_value_changed" ]
163+ [connection signal ="gui_input" from ="VBoxContainer/EditorContainer/CurveEditor/@Control@283287" to ="VBoxContainer/EditorContainer/CurveEditor/@Control@283287" method ="_on_ControlPoint_gui_input" ]
164+ [connection signal ="mouse_entered" from ="VBoxContainer/EditorContainer/CurveEditor/@Control@283287" to ="VBoxContainer/EditorContainer/CurveEditor/@Control@283287" method ="_on_mouse_entered" ]
165+ [connection signal ="mouse_exited" from ="VBoxContainer/EditorContainer/CurveEditor/@Control@283287" to ="VBoxContainer/EditorContainer/CurveEditor/@Control@283287" method ="_on_mouse_exited" ]
166+ [connection signal ="value_changed" from ="VBoxContainer/ControlUIContainer/ControlUI/PositionX" to ="VBoxContainer/EditorContainer/CurveEditor" method ="_on_position_x_value_changed" ]
167+ [connection signal ="value_changed" from ="VBoxContainer/ControlUIContainer/ControlUI/PositionY" to ="VBoxContainer/EditorContainer/CurveEditor" method ="_on_position_y_value_changed" ]
168+ [connection signal ="value_changed" from ="VBoxContainer/ControlUIContainer/ControlUI/LeftSlope" to ="VBoxContainer/EditorContainer/CurveEditor" method ="_on_left_slope_value_changed" ]
169+ [connection signal ="value_changed" from ="VBoxContainer/ControlUIContainer/ControlUI/RightSlope" to ="VBoxContainer/EditorContainer/CurveEditor" method ="_on_right_slope_value_changed" ]
67170[connection signal ="pressed" from ="VBoxContainer/HBoxContainer/Invert" to ="." method ="_on_Invert_pressed" ]
68171[connection signal ="pressed" from ="VBoxContainer/HBoxContainer/OK" to ="." method ="_on_OK_pressed" ]
69172[connection signal ="pressed" from ="VBoxContainer/HBoxContainer/Cancel" to ="." method ="_on_Cancel_pressed" ]
0 commit comments