From dac6851d7cd04c7326fc967a93a772fa100e5133 Mon Sep 17 00:00:00 2001 From: LMW Date: Thu, 7 Aug 2025 11:21:32 +0800 Subject: [PATCH] Fixed non-critical errors, warnings and typos --- addons/flexible_layout/flexible_overlay.gd | 1 - addons/flexible_layout/flexible_overlay.tscn | 12 ++ material_maker/icons/icons.gd | 8 +- material_maker/main_window.gd | 1 + material_maker/nodes/comment/comment.gd | 4 +- material_maker/nodes/reroute/reroute.gd | 4 +- .../panels/preview_2d/export_menu.gd | 4 +- .../panels/preview_2d/preview_2d_panel.gd | 12 +- .../panels/preview_2d/preview_2d_panel.tscn | 166 +++++++++--------- .../preview_3d/preview_mesh_generated.gd | 2 +- material_maker/projects_panel.tscn | 6 +- material_maker/steam.gd | 2 +- .../environment_manager.gd | 5 +- .../color_picker_popup.tscn | 4 +- material_maker/widgets/tabs/tabs.gd | 3 +- .../windows/accept_dialog/accept_dialog.tscn | 1 - .../windows/add_node_popup/add_node_popup.gd | 4 +- .../environment_editor/environment_editor.gd | 2 +- .../windows/sdf_builder/preview_3d.gd | 1 - .../windows/sdf_builder/sdf_builder.gd | 12 +- .../windows/sdf_builder/sdf_builder_tree.gd | 16 +- parse_args.tscn | 4 + scripts/fixup.gd | 7 +- 23 files changed, 150 insertions(+), 131 deletions(-) diff --git a/addons/flexible_layout/flexible_overlay.gd b/addons/flexible_layout/flexible_overlay.gd index 3124a998e..1596caeca 100644 --- a/addons/flexible_layout/flexible_overlay.gd +++ b/addons/flexible_layout/flexible_overlay.gd @@ -77,4 +77,3 @@ func _can_drop_data(at_position, data): $Rect.visible = false return false return true - diff --git a/addons/flexible_layout/flexible_overlay.tscn b/addons/flexible_layout/flexible_overlay.tscn index 98446aa2e..f5990c2ea 100644 --- a/addons/flexible_layout/flexible_overlay.tscn +++ b/addons/flexible_layout/flexible_overlay.tscn @@ -3,7 +3,11 @@ [ext_resource type="Script" uid="uid://bhwlc7y7qgb2v" path="res://addons/flexible_layout/flexible_overlay.gd" id="1_5tomg"] [ext_resource type="Texture2D" uid="uid://7ydi1c1ic17e" path="res://addons/flexible_layout/arrow.svg" id="2_0tnc1"] +<<<<<<< HEAD [node name="Control" type="ColorRect" unique_id=619538545] +======= +[node name="Control" type="ColorRect" unique_id=1731621660] +>>>>>>> 816769bbb (Fixed non-critical errors, warnings and typos) anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -12,7 +16,11 @@ grow_vertical = 2 color = Color(0.501961, 0.501961, 0.501961, 0.501961) script = ExtResource("1_5tomg") +<<<<<<< HEAD [node name="Arrow" type="TextureRect" parent="." unique_id=607104480] +======= +[node name="Arrow" type="TextureRect" parent="." unique_id=589490907] +>>>>>>> 816769bbb (Fixed non-critical errors, warnings and typos) visible = false layout_mode = 0 offset_right = 40.0 @@ -20,7 +28,11 @@ offset_bottom = 40.0 pivot_offset = Vector2(32, 32) texture = ExtResource("2_0tnc1") +<<<<<<< HEAD [node name="Rect" type="ColorRect" parent="." unique_id=199752483] +======= +[node name="Rect" type="ColorRect" parent="." unique_id=1802223899] +>>>>>>> 816769bbb (Fixed non-critical errors, warnings and typos) visible = false layout_mode = 0 offset_right = 40.0 diff --git a/material_maker/icons/icons.gd b/material_maker/icons/icons.gd index ca0bf6118..1f560b342 100644 --- a/material_maker/icons/icons.gd +++ b/material_maker/icons/icons.gd @@ -1,10 +1,10 @@ extends ImageTexture func _init(): - var image : Image + var img : Image if FileAccess.file_exists("user://icons.svg"): - image = Image.load_from_file("user://icons.svg") + img = Image.load_from_file("user://icons.svg") else: var texture : Texture2D = ResourceLoader.load("res://material_maker/icons/icons.svg") - image = texture.get_image() - set_image(image) + img = texture.get_image() + set_image(img) diff --git a/material_maker/main_window.gd b/material_maker/main_window.gd index 4d7f9b658..1fe0dbc7a 100644 --- a/material_maker/main_window.gd +++ b/material_maker/main_window.gd @@ -313,6 +313,7 @@ func on_config_changed() -> void: # This prevents UI elements from being too small on hiDPI displays. ui_scale = 2 if DisplayServer.screen_get_dpi() >= 192 and DisplayServer.screen_get_size().x >= 2048 else 1 get_viewport().content_scale_factor = ui_scale + await get_tree().process_frame size = get_viewport().size/get_viewport().content_scale_factor position = Vector2i(0, 0) #ProjectSettings.set_setting("display/window/stretch/scale", scale) diff --git a/material_maker/nodes/comment/comment.gd b/material_maker/nodes/comment/comment.gd index 9e4643705..20f620459 100644 --- a/material_maker/nodes/comment/comment.gd +++ b/material_maker/nodes/comment/comment.gd @@ -20,7 +20,7 @@ var generator : MMGenComment: if mm_globals.get_config("auto_size_comment"): resize_to_selection() -var pallette_colors = [ +var palette_colors = [ Color("F8B8B3"), Color("F7FDAF"), Color("AAF3A2"), @@ -141,7 +141,7 @@ func _on_change_color_pressed(): $Popup.get_window().size = $Popup.get_window().get_contents_minimum_size() * content_scale_factor $Popup.position = get_screen_transform() * get_local_mouse_position() $Popup.popup() - var corrected_color = pallette_colors.duplicate(true) + var corrected_color = palette_colors.duplicate(true) if !light_theme: for i in corrected_color.size(): corrected_color[i] = corrected_color[i].darkened(0.5) diff --git a/material_maker/nodes/reroute/reroute.gd b/material_maker/nodes/reroute/reroute.gd index 8bbcbb9fb..68d50299a 100644 --- a/material_maker/nodes/reroute/reroute.gd +++ b/material_maker/nodes/reroute/reroute.gd @@ -18,8 +18,8 @@ func set_generator(g : MMGenBase) -> void: await set_preview(g.get_parameter("preview")) update_node() -func _draw_port(slot_index: int, position: Vector2i, left: bool, color: Color) -> void: - draw_circle(position, 5, color, true, -1, true) +func _draw_port(_slot_index: int, _position: Vector2i, _left: bool, color: Color) -> void: + draw_circle(_position, 5, color, true, -1, true) #func set_theme_type(type : StringName): #var current_theme : Theme = mm_globals.main_window.theme diff --git a/material_maker/panels/preview_2d/export_menu.gd b/material_maker/panels/preview_2d/export_menu.gd index 5d4efb1f6..91c0f2bfe 100644 --- a/material_maker/panels/preview_2d/export_menu.gd +++ b/material_maker/panels/preview_2d/export_menu.gd @@ -191,9 +191,9 @@ func interpret_file_name(file_name: String, path:="") -> String: return MMLoader.interpret_file_name(file_name, path, extension, graph_node, additional_ids, resolution) -func _on_custom_resolution_x_value_changed(value: Variant) -> void: +func _on_custom_resolution_x_value_changed(_value: Variant) -> void: update() -func _on_custom_resolution_y_value_changed(value: Variant) -> void: +func _on_custom_resolution_y_value_changed(_value: Variant) -> void: update() diff --git a/material_maker/panels/preview_2d/preview_2d_panel.gd b/material_maker/panels/preview_2d/preview_2d_panel.gd index b533ba164..cd0dfd6f8 100644 --- a/material_maker/panels/preview_2d/preview_2d_panel.gd +++ b/material_maker/panels/preview_2d/preview_2d_panel.gd @@ -50,9 +50,9 @@ var checker_brightness: int = 1: if v == checker_brightness: return checker_brightness = v - var color = func(v) : return Color(v,v,v,1.0) - var color_a = color.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][0]) - var color_b = color.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][1]) + var col = func(f) : return Color(f,f,f,1.0) + var color_a = col.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][0]) + var color_b = col.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][1]) material.set_shader_parameter("background_color_1", color_a) material.set_shader_parameter("background_color_2", color_b) mm_globals.set_config("preview"+config_var_suffix+"_checker_brightness", checker_brightness) @@ -126,11 +126,11 @@ func update_material(source): material.set_shader_parameter("mode", view_mode) material.set_shader_parameter("background_color", get_theme_stylebox("panel", "MM_PanelBackground").bg_color) - var color = func(v) : return Color(v,v,v,1.0) + var col = func(f) : return Color(f,f,f,1.0) material.set_shader_parameter("background_color_1", - color.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][0])) + col.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][0])) material.set_shader_parameter("background_color_2", - color.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][1])) + col.call(CHECKER_BRIGHTNESS_OPTIONS[checker_brightness][1])) material.set_shader_parameter("checker_size", CHECKER_SIZE_OPTIONS[checker_size]) diff --git a/material_maker/panels/preview_2d/preview_2d_panel.tscn b/material_maker/panels/preview_2d/preview_2d_panel.tscn index 63dfbd1b0..b78873f5e 100644 --- a/material_maker/panels/preview_2d/preview_2d_panel.tscn +++ b/material_maker/panels/preview_2d/preview_2d_panel.tscn @@ -1,9 +1,9 @@ -[gd_scene load_steps=30 format=3 uid="uid://b7x7yqgsurxhv"] +[gd_scene format=3 uid="uid://b7x7yqgsurxhv"] [ext_resource type="Texture2D" uid="uid://c0j4px4n72di5" path="res://material_maker/icons/icons.tres" id="1"] [ext_resource type="PackedScene" uid="uid://est6pi7xbptp" path="res://material_maker/panels/preview_2d/control_point.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://bb6iar0tbj2qt" path="res://material_maker/panels/preview_2d/preview_2d.tscn" id="3"] -[ext_resource type="Script" uid="uid://cjtefdp8oh215" path="res://material_maker/panels/preview_2d/axes.gd" id="3_r76ng"] +[ext_resource type="Script" path="res://material_maker/panels/preview_2d/axes.gd" id="3_r76ng"] [ext_resource type="Script" uid="uid://cj476fi1ociuw" path="res://material_maker/panels/preview_2d/preview_2d_panel.gd" id="4"] [ext_resource type="PackedScene" uid="uid://djura7a50b2aq" path="res://material_maker/widgets/polygon_edit/polygon_editor.tscn" id="4_gd40d"] [ext_resource type="Script" uid="uid://p2topj3y4p63" path="res://material_maker/panels/preview_2d/lines.gd" id="5"] @@ -19,7 +19,7 @@ [ext_resource type="Script" uid="uid://pielyrq85378" path="res://material_maker/panels/preview_2d/two_icon_toggle_button.gd" id="17_07kc5"] [ext_resource type="FontFile" uid="uid://lro0qdrhfytt" path="res://material_maker/theme/font_rubik/Rubik-Light.ttf" id="18_kn37y"] -[sub_resource type="Shader" id="Shader_0mwcg"] +[sub_resource type="Shader" id="Shader_r76ng"] resource_local_to_scene = true code = "shader_type canvas_item; @@ -47,9 +47,9 @@ void fragment() { } " -[sub_resource type="ShaderMaterial" id="2"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_63a3x"] resource_local_to_scene = true -shader = SubResource("Shader_0mwcg") +shader = SubResource("Shader_r76ng") shader_parameter/preview_2d_size = Vector2(100, 100) shader_parameter/preview_2d_scale = 1.655 shader_parameter/preview_2d_center = Vector2(0.46, 0.56) @@ -95,8 +95,8 @@ keycode = 69 [sub_resource type="Shortcut" id="Shortcut_llf02"] events = [SubResource("InputEventKey_rhw4u")] -[node name="Preview2D" node_paths=PackedStringArray("shortcut_context") instance=ExtResource("3")] -material = SubResource("2") +[node name="Preview2D" unique_id=1485261018 node_paths=PackedStringArray("shortcut_context") instance=ExtResource("3")] +material = SubResource("ShaderMaterial_63a3x") custom_minimum_size = Vector2(100, 100) offset_left = 8.0 offset_top = -5.0 @@ -165,21 +165,21 @@ void fragment() { } " -[node name="Guides" type="Control" parent="." index="0"] +[node name="Guides" type="Control" parent="." index="0" unique_id=1375034005] anchors_preset = 0 anchor_right = 1.0 anchor_bottom = 1.0 mouse_filter = 2 script = ExtResource("5") -[node name="Axes" type="Control" parent="." index="1"] +[node name="Axes" type="Control" parent="." index="1" unique_id=149672191] visible = false anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 script = ExtResource("3_r76ng") -[node name="PolygonEditor" parent="." index="2" instance=ExtResource("4_gd40d")] +[node name="PolygonEditor" parent="." index="2" unique_id=771871650 instance=ExtResource("4_gd40d")] visible = false layout_mode = 1 offset_right = 0.0 @@ -187,25 +187,25 @@ offset_bottom = 0.0 draw_area = false auto_rescale = false -[node name="SplinesEditor" parent="." index="3" instance=ExtResource("5_5hlfo")] +[node name="SplinesEditor" parent="." index="3" unique_id=561180824 instance=ExtResource("5_5hlfo")] visible = false layout_mode = 1 draw_area = false draw_control_lines = true -[node name="PixelsEditor" parent="." index="4" instance=ExtResource("6_m4663")] +[node name="PixelsEditor" parent="." index="4" unique_id=1074973523 instance=ExtResource("6_m4663")] visible = false layout_mode = 1 draw_area = false alpha = 0.5 -[node name="LatticeEditor" parent="." index="5" instance=ExtResource("7_u2w4r")] +[node name="LatticeEditor" parent="." index="5" unique_id=209528971 instance=ExtResource("7_u2w4r")] visible = false layout_mode = 1 offset_right = 0.0 offset_bottom = 0.0 -[node name="P1" parent="." index="6" instance=ExtResource("2")] +[node name="P1" parent="." index="6" unique_id=529468902 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.466667, 0, 1) layout_mode = 0 @@ -215,7 +215,7 @@ offset_right = 37.0 offset_bottom = 61.0 texture = SubResource("3") -[node name="P2" parent="." index="7" instance=ExtResource("2")] +[node name="P2" parent="." index="7" unique_id=1501624694 instance=ExtResource("2")] visible = false self_modulate = Color(0, 0.505882, 1, 1) layout_mode = 0 @@ -225,7 +225,7 @@ offset_right = 37.0 offset_bottom = 61.0 texture = SubResource("3") -[node name="P11" parent="." index="8" instance=ExtResource("2")] +[node name="P11" parent="." index="8" unique_id=253743633 instance=ExtResource("2")] visible = false self_modulate = Color(0, 0.505882, 1, 1) layout_mode = 0 @@ -237,7 +237,7 @@ texture = SubResource("3") parent_control = "P1" apply_local_transform = true -[node name="RadiusP11" parent="." index="9" instance=ExtResource("2")] +[node name="RadiusP11" parent="." index="9" unique_id=1858380169 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -250,7 +250,7 @@ texture = SubResource("4") parent_control = "P11" control_type = 2 -[node name="P12" parent="." index="10" instance=ExtResource("2")] +[node name="P12" parent="." index="10" unique_id=152976329 instance=ExtResource("2")] visible = false self_modulate = Color(0, 0.505882, 1, 1) layout_mode = 0 @@ -262,7 +262,7 @@ texture = SubResource("3") parent_control = "P1" apply_local_transform = true -[node name="P3" parent="." index="11" instance=ExtResource("2")] +[node name="P3" parent="." index="11" unique_id=350471775 instance=ExtResource("2")] visible = false self_modulate = Color(0, 1, 0.380392, 1) layout_mode = 0 @@ -272,7 +272,7 @@ offset_right = 21.0 offset_bottom = 45.0 texture = SubResource("4") -[node name="Rect1" parent="." index="12" instance=ExtResource("2")] +[node name="Rect1" parent="." index="12" unique_id=540226066 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -285,7 +285,7 @@ parent_control = "P1" control_type = 1 apply_local_transform = true -[node name="Radius1" parent="." index="13" instance=ExtResource("2")] +[node name="Radius1" parent="." index="13" unique_id=4704319 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -298,7 +298,7 @@ texture = SubResource("4") parent_control = "P1" control_type = 2 -[node name="Radius2" parent="." index="14" instance=ExtResource("2")] +[node name="Radius2" parent="." index="14" unique_id=190324003 instance=ExtResource("2")] visible = false self_modulate = Color(0, 0.505882, 1, 1) layout_mode = 0 @@ -311,7 +311,7 @@ texture = SubResource("4") parent_control = "P2" control_type = 2 -[node name="Radius11" parent="." index="15" instance=ExtResource("2")] +[node name="Radius11" parent="." index="15" unique_id=1742026713 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -324,7 +324,7 @@ texture = SubResource("4") parent_control = "Radius1" control_type = 2 -[node name="Scale1" parent="." index="16" instance=ExtResource("2")] +[node name="Scale1" parent="." index="16" unique_id=839320853 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -337,7 +337,7 @@ texture = SubResource("4") parent_control = "P1" control_type = 3 -[node name="RotateScale1" parent="." index="17" instance=ExtResource("2")] +[node name="RotateScale1" parent="." index="17" unique_id=859579352 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -350,7 +350,7 @@ texture = SubResource("4") parent_control = "P1" control_type = 4 -[node name="Angle1" parent="." index="18" instance=ExtResource("2")] +[node name="Angle1" parent="." index="18" unique_id=228487615 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -363,7 +363,7 @@ texture = SubResource("4") parent_control = "P1" control_type = 2 -[node name="Angle2" parent="." index="19" instance=ExtResource("2")] +[node name="Angle2" parent="." index="19" unique_id=902988990 instance=ExtResource("2")] visible = false self_modulate = Color(1, 0.631373, 0, 1) layout_mode = 0 @@ -376,7 +376,7 @@ texture = SubResource("4") parent_control = "P1" control_type = 2 -[node name="Accumulate" type="SubViewport" parent="." index="20"] +[node name="Accumulate" type="SubViewport" parent="." index="20" unique_id=345506402] disable_3d = true handle_input_locally = false gui_snap_controls_to_pixels = false @@ -384,12 +384,12 @@ size = Vector2i(2, 2) render_target_clear_mode = 1 render_target_update_mode = 1 -[node name="Iteration" type="ColorRect" parent="Accumulate" index="0"] +[node name="Iteration" type="ColorRect" parent="Accumulate" index="0" unique_id=421196395] material = SubResource("6") offset_right = 40.0 offset_bottom = 40.0 -[node name="MenuBar" type="ScrollContainer" parent="." index="21"] +[node name="MenuBar" type="ScrollContainer" parent="." index="21" unique_id=828177746] unique_name_in_owner = true clip_contents = false layout_mode = 1 @@ -401,20 +401,20 @@ theme_type_variation = &"MM_PanelMenuBackground" horizontal_scroll_mode = 3 vertical_scroll_mode = 0 -[node name="HBox" type="HFlowContainer" parent="MenuBar" index="0"] +[node name="HBox" type="HFlowContainer" parent="MenuBar" index="0" unique_id=85786889] layout_mode = 2 size_flags_horizontal = 3 -[node name="MainMenu" type="PanelContainer" parent="MenuBar/HBox" index="0"] +[node name="MainMenu" type="PanelContainer" parent="MenuBar/HBox" index="0" unique_id=1011434485] layout_mode = 2 size_flags_vertical = 0 theme_type_variation = &"MM_PanelMenuBar" -[node name="HBox" type="HBoxContainer" parent="MenuBar/HBox/MainMenu" index="0"] +[node name="HBox" type="HBoxContainer" parent="MenuBar/HBox/MainMenu" index="0" unique_id=1980063647] layout_mode = 2 theme_type_variation = &"MM_PanelMenuBar" -[node name="ResetViewButton" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="0"] +[node name="ResetViewButton" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="0" unique_id=666916196] unique_name_in_owner = true custom_minimum_size = Vector2(25, 25) layout_mode = 2 @@ -426,7 +426,7 @@ icon_alignment = 1 script = ExtResource("10_83edi") icon_name = "reset_view" -[node name="ViewMenu" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="1" node_paths=PackedStringArray("shortcut_context")] +[node name="ViewMenu" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="1" unique_id=1673979480 node_paths=PackedStringArray("shortcut_context")] custom_minimum_size = Vector2(40, 25) layout_mode = 2 tooltip_text = "View" @@ -437,7 +437,7 @@ button_mask = 3 script = ExtResource("12_nrhap") icon_name = "view" -[node name="ViewMenuPanel" type="PanelContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu" index="0"] +[node name="ViewMenuPanel" type="PanelContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu" index="0" unique_id=599620463] top_level = true layout_mode = 0 offset_left = 493.0 @@ -447,20 +447,20 @@ offset_bottom = 145.0 theme_type_variation = &"MM_PanelMenuSubPanel" script = ExtResource("13_5w2hy") -[node name="VBox" type="GridContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel" index="0"] +[node name="VBox" type="GridContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel" index="0" unique_id=935561717] layout_mode = 2 columns = 2 -[node name="Control" type="Control" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="0"] +[node name="Control" type="Control" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="0" unique_id=391259046] visible = false layout_mode = 2 -[node name="ViewModeLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="1"] +[node name="ViewModeLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="1" unique_id=682805337] layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "View" -[node name="ViewMode" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="2" instance=ExtResource("12_4017l")] +[node name="ViewMode" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="2" unique_id=1487681168 instance=ExtResource("12_4017l")] unique_name_in_owner = true layout_mode = 2 selected = 0 @@ -472,12 +472,12 @@ popup/item_1/id = 1 popup/item_2/text = "Clamp" popup/item_2/id = 2 -[node name="PostProcessingLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="3"] +[node name="PostProcessingLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="3" unique_id=2127140207] layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "Filter" -[node name="PostProcessing" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="4" instance=ExtResource("12_4017l")] +[node name="PostProcessing" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="4" unique_id=522965351 instance=ExtResource("12_4017l")] unique_name_in_owner = true layout_mode = 2 selected = 0 @@ -495,15 +495,15 @@ popup/item_4/id = 4 popup/item_5/text = "Lowres 512x512" popup/item_5/id = 5 -[node name="GuidesLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="5"] +[node name="GuidesLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="5" unique_id=903827044] layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "Guides" -[node name="BoxContainer" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="6"] +[node name="BoxContainer" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="6" unique_id=876875395] layout_mode = 2 -[node name="Guides" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer" index="0" instance=ExtResource("12_4017l")] +[node name="Guides" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer" index="0" unique_id=988905647 instance=ExtResource("12_4017l")] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 @@ -518,7 +518,7 @@ popup/item_2/id = 2 popup/item_3/text = "Grid" popup/item_3/id = 3 -[node name="CustomGridSize" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer" index="1" instance=ExtResource("14_qr76f")] +[node name="CustomGridSize" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer" index="1" unique_id=222491806 instance=ExtResource("14_qr76f")] unique_name_in_owner = true layout_mode = 2 value = 10.0 @@ -527,20 +527,20 @@ max_value = 32.0 step = 1.0 float_only = true -[node name="GuidesColor" type="ColorPickerButton" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer" index="2"] +[node name="GuidesColor" type="ColorPickerButton" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer" index="2" unique_id=1161390954] unique_name_in_owner = true custom_minimum_size = Vector2(32, 0) layout_mode = 2 -[node name="AlphaLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="7"] +[node name="AlphaLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="7" unique_id=301098169] layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "Alpha" -[node name="BoxContainer2" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="8"] +[node name="BoxContainer2" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox" index="8" unique_id=403823333] layout_mode = 2 -[node name="CheckerBrightness" type="OptionButton" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer2" index="0"] +[node name="CheckerBrightness" type="OptionButton" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer2" index="0" unique_id=1232924334] unique_name_in_owner = true layout_mode = 2 tooltip_text = "Transparency checkers brightness" @@ -553,7 +553,7 @@ popup/item_1/id = 1 popup/item_2/text = "Dark" popup/item_2/id = 2 -[node name="CheckerSize" type="OptionButton" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer2" index="1"] +[node name="CheckerSize" type="OptionButton" parent="MenuBar/HBox/MainMenu/HBox/ViewMenu/ViewMenuPanel/VBox/BoxContainer2" index="1" unique_id=457694742] unique_name_in_owner = true layout_mode = 2 tooltip_text = "Transparency checkers size" @@ -566,7 +566,7 @@ popup/item_1/id = 1 popup/item_2/text = "Large" popup/item_2/id = 2 -[node name="ExportMenu" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="2" node_paths=PackedStringArray("shortcut_context")] +[node name="ExportMenu" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="2" unique_id=1912611188 node_paths=PackedStringArray("shortcut_context")] unique_name_in_owner = true custom_minimum_size = Vector2(40, 25) layout_mode = 2 @@ -578,7 +578,7 @@ button_mask = 3 script = ExtResource("12_nrhap") icon_name = "export" -[node name="ExportMenuPanel" type="PanelContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu" index="0"] +[node name="ExportMenuPanel" type="PanelContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu" index="0" unique_id=1994821460] top_level = true custom_minimum_size = Vector2(320, 0) layout_mode = 0 @@ -589,50 +589,50 @@ offset_bottom = 380.0 theme_type_variation = &"MM_PanelMenuSubPanel" script = ExtResource("16_0fl4g") -[node name="VBox" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel" index="0"] +[node name="VBox" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel" index="0" unique_id=639831909] layout_mode = 2 vertical = true -[node name="Grid" type="GridContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox" index="0"] +[node name="Grid" type="GridContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox" index="0" unique_id=1907772090] layout_mode = 2 columns = 2 -[node name="ExportFolderLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="0"] +[node name="ExportFolderLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="0" unique_id=381640344] layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "Folder" -[node name="ExportFolder" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="1"] +[node name="ExportFolder" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="1" unique_id=5918200] layout_mode = 2 theme_override_constants/separation = 2 -[node name="ExportFolder" type="LineEdit" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFolder" index="0"] +[node name="ExportFolder" type="LineEdit" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFolder" index="0" unique_id=1277689792] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 15 -[node name="ExportFolderButton" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFolder" index="1"] +[node name="ExportFolderButton" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFolder" index="1" unique_id=349626168] unique_name_in_owner = true custom_minimum_size = Vector2(25, 25) layout_mode = 2 icon_alignment = 1 -[node name="ExportFileLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="2"] +[node name="ExportFileLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="2" unique_id=1432684286] layout_mode = 2 size_flags_vertical = 0 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "File Name" -[node name="ExportFile" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="3"] +[node name="ExportFile" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="3" unique_id=1065849722] layout_mode = 2 theme_override_constants/separation = 2 vertical = true -[node name="BoxContainer" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile" index="0"] +[node name="BoxContainer" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile" index="0" unique_id=1108458058] layout_mode = 2 -[node name="ExportFile" type="LineEdit" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile/BoxContainer" index="0"] +[node name="ExportFile" type="LineEdit" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile/BoxContainer" index="0" unique_id=1342348122] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 @@ -642,7 +642,7 @@ You can use $project, $node, $idx and $resolution to make the file-name auto-adj theme_override_font_sizes/font_size = 15 text = "$project_$node" -[node name="FileType" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile/BoxContainer" index="1" instance=ExtResource("12_4017l")] +[node name="FileType" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile/BoxContainer" index="1" unique_id=11124120 instance=ExtResource("12_4017l")] unique_name_in_owner = true layout_mode = 2 selected = 0 @@ -652,22 +652,22 @@ popup/item_0/id = 0 popup/item_1/text = ".exr" popup/item_1/id = 1 -[node name="ExportFileResultLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile" index="1"] +[node name="ExportFileResultLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ExportFile" index="1" unique_id=1330100644] unique_name_in_owner = true layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" theme_override_fonts/font = SubResource("FontVariation_wkuuo") -[node name="ResolutionLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="4"] +[node name="ResolutionLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="4" unique_id=353786913] layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "Resolution" -[node name="ResolutionSection" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="5"] +[node name="ResolutionSection" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="5" unique_id=1118038171] unique_name_in_owner = true layout_mode = 2 -[node name="Resolution" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection" index="0" instance=ExtResource("12_4017l")] +[node name="Resolution" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection" index="0" unique_id=1571991979 instance=ExtResource("12_4017l")] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 @@ -692,12 +692,12 @@ popup/item_7/id = 7 popup/item_8/text = "Custom" popup/item_8/id = 8 -[node name="CustomResolutionSection" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection" index="1"] +[node name="CustomResolutionSection" type="BoxContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection" index="1" unique_id=1808369593] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 -[node name="CustomResolutionX" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection/CustomResolutionSection" index="0" instance=ExtResource("14_qr76f")] +[node name="CustomResolutionX" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection/CustomResolutionSection" index="0" unique_id=1524308647 instance=ExtResource("14_qr76f")] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 @@ -708,11 +708,11 @@ max_value = 2048.0 step = 1.0 float_only = true -[node name="x" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection/CustomResolutionSection" index="1"] +[node name="x" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection/CustomResolutionSection" index="1" unique_id=233812248] layout_mode = 2 text = "x" -[node name="CustomResolutionY" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection/CustomResolutionSection" index="2" instance=ExtResource("14_qr76f")] +[node name="CustomResolutionY" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/ResolutionSection/CustomResolutionSection" index="2" unique_id=1998658305 instance=ExtResource("14_qr76f")] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 @@ -723,42 +723,42 @@ max_value = 2048.0 step = 1.0 float_only = true -[node name="ExportLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="6"] +[node name="ExportLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="6" unique_id=532645390] layout_mode = 2 theme_type_variation = &"MM_PanelMenuSubPanelLabel" text = "Export" -[node name="BoxContainer" type="GridContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="7"] +[node name="BoxContainer" type="GridContainer" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid" index="7" unique_id=1802535513] layout_mode = 2 size_flags_horizontal = 3 columns = 2 -[node name="Image" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="0"] +[node name="Image" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="0" unique_id=487613672] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 shortcut = SubResource("Shortcut_llf02") text = "Image" -[node name="Reference" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="1"] +[node name="Reference" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="1" unique_id=692084167] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 text = "To Reference" -[node name="Animation" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="2"] +[node name="Animation" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="2" unique_id=1559610033] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 text = "Animation" -[node name="TAA_Render" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="3"] +[node name="TAA_Render" type="Button" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox/Grid/BoxContainer" index="3" unique_id=402432300] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 text = "TAA Render" -[node name="ExportNotificationLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox" index="1"] +[node name="ExportNotificationLabel" type="Label" parent="MenuBar/HBox/MainMenu/HBox/ExportMenu/ExportMenuPanel/VBox" index="1" unique_id=404060095] unique_name_in_owner = true visible = false layout_mode = 2 @@ -767,7 +767,7 @@ theme_override_colors/font_color = Color(0.52, 0.52, 0.52, 1) theme_override_fonts/font = SubResource("FontVariation_wkuuo") autowrap_mode = 1 -[node name="PreviewLocked" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="3"] +[node name="PreviewLocked" type="Button" parent="MenuBar/HBox/MainMenu/HBox" index="3" unique_id=483845947] unique_name_in_owner = true custom_minimum_size = Vector2(25, 25) layout_mode = 2 @@ -778,7 +778,7 @@ script = ExtResource("17_07kc5") icon_normal_name = "lock_unlocked" icon_pressed_name = "lock_locked" -[node name="ComplexParameters" type="OptionButton" parent="MenuBar/HBox/MainMenu/HBox" index="4"] +[node name="ComplexParameters" type="OptionButton" parent="MenuBar/HBox/MainMenu/HBox" index="4" unique_id=762458027] unique_name_in_owner = true visible = false layout_mode = 2 @@ -786,7 +786,9 @@ layout_mode = 2 [connection signal="gui_input" from="." to="." method="_on_gui_input"] [connection signal="mouse_entered" from="." to="." method="_on_Preview2D_mouse_entered"] [connection signal="unhandled_event" from="PolygonEditor" to="." method="_on_gui_input"] -[connection signal="gui_input" from="PolygonEditor/@Control@42512" to="PolygonEditor/@Control@42512" method="_on_ControlPoint_gui_input"] +[connection signal="gui_input" from="PolygonEditor/ControlPoint" to="PolygonEditor/ControlPoint" method="_on_ControlPoint_gui_input"] +[connection signal="mouse_entered" from="PolygonEditor/ControlPoint" to="PolygonEditor/ControlPoint" method="_on_mouse_entered"] +[connection signal="mouse_exited" from="PolygonEditor/ControlPoint" to="PolygonEditor/ControlPoint" method="_on_mouse_exited"] [connection signal="unhandled_event" from="SplinesEditor" to="." method="_on_gui_input"] [connection signal="unhandled_event" from="PixelsEditor" to="." method="_on_gui_input"] [connection signal="unhandled_event" from="LatticeEditor" to="." method="_on_gui_input"] diff --git a/material_maker/panels/preview_3d/preview_mesh_generated.gd b/material_maker/panels/preview_3d/preview_mesh_generated.gd index e52951ae3..c22a15cc9 100644 --- a/material_maker/panels/preview_3d/preview_mesh_generated.gd +++ b/material_maker/panels/preview_3d/preview_mesh_generated.gd @@ -41,7 +41,7 @@ func do_update_mesh() -> void: shader.add_output_parameter("tangents", "float", 4*vertex_count) shader.add_output_parameter("tex_uvs", "float", 2*vertex_count) shader.add_output_parameter("indexes", "int", index_count) - await shader.set_shader_ext(compute_shader) + shader.set_shader_ext(compute_shader) shader_size = size shader_string = compute_shader var opv : Dictionary = { vertices_format="vec3", normals_format="vec3", tex_uvs_format="vec2" } diff --git a/material_maker/projects_panel.tscn b/material_maker/projects_panel.tscn index a18fcf384..76a64d3f6 100644 --- a/material_maker/projects_panel.tscn +++ b/material_maker/projects_panel.tscn @@ -507,9 +507,9 @@ Scroll to zoom the 3D Preview." [connection signal="tab_changed" from="Projects/TabBar" to="Projects" method="set_current_tab"] [connection signal="tab_close_pressed" from="Projects/TabBar" to="Projects" method="close_tab"] [connection signal="timeout" from="Projects/CrashRecoveryTimer" to="Projects" method="_on_CrashRecoveryTimer_timeout"] -[connection signal="pressed" from="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomeMenuPanel/VBoxContainer/ZoomOut" to="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomeMenuPanel" method="_on_zoom_out_pressed"] -[connection signal="pressed" from="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomeMenuPanel/VBoxContainer/ZoomIn" to="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomeMenuPanel" method="_on_zoom_in_pressed"] -[connection signal="pressed" from="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomeMenuPanel/VBoxContainer/ZoomReset" to="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomeMenuPanel" method="_on_zoom_reset_pressed"] +[connection signal="pressed" from="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomMenuPanel/VBoxContainer/ZoomOut" to="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomMenuPanel" method="_on_zoom_out_pressed"] +[connection signal="pressed" from="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomMenuPanel/VBoxContainer/ZoomIn" to="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomMenuPanel" method="_on_zoom_in_pressed"] +[connection signal="pressed" from="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomMenuPanel/VBoxContainer/ZoomReset" to="MenuBar/HBox/MainGraphMenuBar/HBox/ZoomMenu/ZoomMenuPanel" method="_on_zoom_reset_pressed"] [connection signal="toggled" from="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel/VBoxContainer/HBoxContainer/GridVisibility" to="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel" method="_on_grid_visibility_toggled"] [connection signal="toggled" from="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel/VBoxContainer/HBoxContainer/GridSnapping" to="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel" method="_on_grid_snapping_toggled"] [connection signal="value_changed" from="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel/VBoxContainer/HBoxContainer/GridSize" to="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel" method="_on_grid_size_value_changed"] diff --git a/material_maker/steam.gd b/material_maker/steam.gd index aab76adeb..548a66961 100644 --- a/material_maker/steam.gd +++ b/material_maker/steam.gd @@ -36,7 +36,7 @@ func get_avatar_texture() -> ImageTexture: await avatar_ready return avatar_texture -func _on_avatar_loaded(user_id: int, avatar_size: int, avatar_buffer: PackedByteArray) -> void: +func _on_avatar_loaded(_user_id : int, avatar_size : int, avatar_buffer : PackedByteArray) -> void: # Create the image and texture for loading var avatar_image: Image = Image.create_from_data(avatar_size, avatar_size, false, Image.FORMAT_RGBA8, avatar_buffer) diff --git a/material_maker/tools/environment_manager/environment_manager.gd b/material_maker/tools/environment_manager/environment_manager.gd index 734046ccd..e9a27f7e4 100644 --- a/material_maker/tools/environment_manager/environment_manager.gd +++ b/material_maker/tools/environment_manager/environment_manager.gd @@ -161,7 +161,10 @@ func read_hdr(index : int, url : String) -> bool: while progress_window != null: await get_tree().process_frame environment_textures[index].erase("hdri") - if set_hdr(index, base_dir+"/environments/hdris/"+url.get_file()): + var _base_dir = base_dir + if OS.has_feature("editor"): + _base_dir = ProjectSettings.globalize_path("res://material_maker") + if set_hdr(index, _base_dir+"/environments/hdris/"+url.get_file()): return true if set_hdr(index, "res://material_maker/environments/hdris/"+url.get_file()): return true diff --git a/material_maker/widgets/color_picker_popup/color_picker_popup.tscn b/material_maker/widgets/color_picker_popup/color_picker_popup.tscn index baeb215e9..e42177484 100644 --- a/material_maker/widgets/color_picker_popup/color_picker_popup.tscn +++ b/material_maker/widgets/color_picker_popup/color_picker_popup.tscn @@ -1,11 +1,11 @@ [gd_scene format=3 uid="uid://85acplyebptc"] -[node name="ColorPickerPopup" type="PopupPanel"] +[node name="ColorPickerPopup" type="PopupPanel" unique_id=686815104] oversampling_override = 1.0 size = Vector2i(306, 615) visible = true -[node name="ColorPicker" type="ColorPicker" parent="."] +[node name="ColorPicker" type="ColorPicker" parent="." unique_id=544309813] offset_left = 4.0 offset_top = 4.0 offset_right = 302.0 diff --git a/material_maker/widgets/tabs/tabs.gd b/material_maker/widgets/tabs/tabs.gd index b9f69d4c0..b593a88e3 100644 --- a/material_maker/widgets/tabs/tabs.gd +++ b/material_maker/widgets/tabs/tabs.gd @@ -112,7 +112,8 @@ func move_active_tab_to(idx_to) -> void: current_tab = idx_to func set_tab_title(index, title) -> void: - $TabBar.set_tab_title(index, title) + if $TabBar.get_tab_count(): + $TabBar.set_tab_title(index, title) func get_current_tab_control() -> Node: if current_tab >= 0 and current_tab < $TabBar.get_tab_count(): diff --git a/material_maker/windows/accept_dialog/accept_dialog.tscn b/material_maker/windows/accept_dialog/accept_dialog.tscn index 4fc9d374c..37b927e7b 100644 --- a/material_maker/windows/accept_dialog/accept_dialog.tscn +++ b/material_maker/windows/accept_dialog/accept_dialog.tscn @@ -3,7 +3,6 @@ [ext_resource type="Script" uid="uid://cadawccuorvkf" path="res://material_maker/windows/accept_dialog/accept_dialog.gd" id="1"] [node name="AcceptDialog" type="AcceptDialog"] -always_on_top = true script = ExtResource("1") [connection signal="canceled" from="." to="." method="_on_AcceptDialog_popup_hide"] diff --git a/material_maker/windows/add_node_popup/add_node_popup.gd b/material_maker/windows/add_node_popup/add_node_popup.gd index 97555aa14..9bb2f84d1 100644 --- a/material_maker/windows/add_node_popup/add_node_popup.gd +++ b/material_maker/windows/add_node_popup/add_node_popup.gd @@ -35,7 +35,7 @@ func add_node(node_data) -> void: current_graph.undoredo.start_group() var nodes : Array = await current_graph.create_nodes(node_data, insert_position) if not nodes.is_empty(): - var node : GraphNode = nodes[0] as GraphNode + var node : GraphNode = nodes[0] if node != null: if qc_node != "": # dragged from port var port_position : Vector2 @@ -197,7 +197,7 @@ func _unhandled_input(event) -> void: func _on_filter_gui_input(event: InputEvent) -> void: - if event.is_action("ui_down"): + if event.is_action("ui_down") and %List.item_count: %List.grab_focus() %List.select(1) diff --git a/material_maker/windows/environment_editor/environment_editor.gd b/material_maker/windows/environment_editor/environment_editor.gd index 89b81d3e8..c0dd035c7 100644 --- a/material_maker/windows/environment_editor/environment_editor.gd +++ b/material_maker/windows/environment_editor/environment_editor.gd @@ -147,7 +147,7 @@ func _on_Environments_gui_input(event): if environment_list.is_selected(index) and ! environment_manager.is_read_only(index): mm_globals.popup_menu(context_menu, $Main/HSplitContainer/Environments) -func _on_ContextMenu_id_pressed(id): +func _on_ContextMenu_id_pressed(_id): var index = environment_list.get_selected_items()[0] environment_manager.delete_environment(index) environment_list.remove_item(index) diff --git a/material_maker/windows/sdf_builder/preview_3d.gd b/material_maker/windows/sdf_builder/preview_3d.gd index a76095946..fa7639085 100644 --- a/material_maker/windows/sdf_builder/preview_3d.gd +++ b/material_maker/windows/sdf_builder/preview_3d.gd @@ -118,7 +118,6 @@ func on_dep_update_value(_buffer_name, parameter_name, value) -> bool: func _on_Preview3D_resized(): if viewport != null: - viewport.size = size update_viewport() func navigation_input(ev) -> bool: diff --git a/material_maker/windows/sdf_builder/sdf_builder.gd b/material_maker/windows/sdf_builder/sdf_builder.gd index e618bacfb..24d40594f 100644 --- a/material_maker/windows/sdf_builder/sdf_builder.gd +++ b/material_maker/windows/sdf_builder/sdf_builder.gd @@ -154,9 +154,9 @@ func update_node_parameters_grid(): if button != null: button.disabled = true -func node_parameter_exists_already(name : String, param_index : int) -> bool: +func node_parameter_exists_already(_name : String, param_index : int) -> bool: for pi in range($GenSDF.node_parameters.size()): - if pi != param_index and $GenSDF.node_parameters[pi].name == name: + if pi != param_index and $GenSDF.node_parameters[pi].name == _name: return true return false @@ -663,11 +663,11 @@ func duplicate_item(item : TreeItem, parent : TreeItem, index : int = -1): duplicate_item(c, new_item) return new_item -func move_item(item, dest, position): +func move_item(item, dest, _position): var source_transform : Transform3D = get_item_transform_3d(item) var dest_transform : Transform3D = get_item_transform_3d(dest) var new_transform : Transform3D = dest_transform.affine_inverse()*source_transform - var new_item : TreeItem = duplicate_item(item, dest, position) + var new_item : TreeItem = duplicate_item(item, dest, _position) item.get_parent().remove_child(item) # update copy's transform parameters rebuild_scene() @@ -686,8 +686,8 @@ func move_item(item, dest, position): parameters["n%d_position_z" % index] = new_transform.origin.z set_node_parameters($GenSDF, parameters) -func _on_Tree_drop_item(item, dest, position): - move_item(item, dest, position) +func _on_Tree_drop_item(item, dest, _position): + move_item(item, dest, _position) # OK/Apply/Cancel buttons diff --git a/material_maker/windows/sdf_builder/sdf_builder_tree.gd b/material_maker/windows/sdf_builder/sdf_builder_tree.gd index 5ec2a8d18..95440e89d 100644 --- a/material_maker/windows/sdf_builder/sdf_builder_tree.gd +++ b/material_maker/windows/sdf_builder/sdf_builder_tree.gd @@ -29,8 +29,8 @@ func get_nearest_parent(item : TreeItem, type : String) -> TreeItem: item = item.get_parent() return item -func _get_drag_data(position): - var item : TreeItem = get_item_at_position(position) +func _get_drag_data(pos): + var item : TreeItem = get_item_at_position(pos) if item == null: return null else: @@ -62,10 +62,10 @@ func get_valid_children_types(parent : TreeItem): valid_children_types.push_back(parent_type.item_category) return valid_children_types -func _can_drop_data(position, data): +func _can_drop_data(_position, data): if data is Dictionary and data.has("item") and data.item is TreeItem: - var destination : TreeItem = get_item_at_position(position) - if destination != null and get_drop_section_at_position(position) != 0: + var destination : TreeItem = get_item_at_position(_position) + if destination != null and get_drop_section_at_position(_position) != 0: destination = destination.get_parent() if not mm_sdf_builder.scene_get_type(data.item.get_meta("scene")).item_category in get_valid_children_types(destination): return false @@ -82,10 +82,10 @@ func get_item_index(item : TreeItem) -> int: index += 1 return -1 -func _drop_data(position, data): +func _drop_data(_position, data): if data is Dictionary and data.has("item") and data.item is TreeItem: - var item = get_item_at_position(position) - match get_drop_section_at_position(position): + var item = get_item_at_position(_position) + match get_drop_section_at_position(_position): 0: emit_signal("drop_item", data.item, item, -1) -1: diff --git a/parse_args.tscn b/parse_args.tscn index 5233c760a..79f1c20f4 100644 --- a/parse_args.tscn +++ b/parse_args.tscn @@ -2,5 +2,9 @@ [ext_resource type="Script" uid="uid://bcslbmkx1lijb" path="res://parse_args.gd" id="1_or0h6"] +<<<<<<< HEAD [node name="ParseArgs" type="Node" unique_id=179554433] +======= +[node name="ParseArgs" type="Node" unique_id=336438771] +>>>>>>> 816769bbb (Fixed non-critical errors, warnings and typos) script = ExtResource("1_or0h6") diff --git a/scripts/fixup.gd b/scripts/fixup.gd index 96ff4f569..05158107e 100644 --- a/scripts/fixup.gd +++ b/scripts/fixup.gd @@ -2,15 +2,14 @@ extends EditorScript func _run(): - var dir : Directory = Directory.new() - dir.open("res://addons/material_maker/nodes") + var dir : DirAccess = DirAccess.open("res://addons/material_maker/nodes") dir.list_dir_begin() # TODOGODOT4 fill missing arguments https://github.com/godotengine/godot/pull/40547 var file_name = dir.get_next() - var loader = load("res://addons/material_maker/engine/loader.gd").new() + var _loader = load("res://addons/material_maker/engine/loader.gd").new() while file_name != "": if file_name.ends_with('.mmg'): print("converting "+file_name) var file_path : String = "res://addons/material_maker/nodes".path_join(file_name) - var g = mm_loader.load_gen(file_path) + var g = await mm_loader.load_gen(file_path) mm_loader.save_gen(file_path, g) file_name = dir.get_next()