diff --git a/material_maker/icons/icons.svg b/material_maker/icons/icons.svg
index c5eab76df..9dac85677 100644
--- a/material_maker/icons/icons.svg
+++ b/material_maker/icons/icons.svg
@@ -211,9 +211,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="56.040276"
- inkscape:cx="97.349628"
- inkscape:cy="135.57214"
+ inkscape:zoom="79.252918"
+ inkscape:cx="86.198719"
+ inkscape:cy="40.257193"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -238,13 +238,20 @@
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1">
@@ -334,9 +341,9 @@
inkscape:connector-curvature="0"
id="path842"
d="M 7.9374999,48.291667 -3.96875,53.583334 7.9374999,58.875001 Z"
- style="fill:#ffe0a7;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ style="fill:#ffe0a7;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
@@ -349,13 +356,13 @@
id="rect846"
style="opacity:1;fill:#adadad;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ ry="2.8421709e-14" />
+ transform="matrix(0.54406715,0,0,0.55326762,-2.1891001,65.082914)">
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.804462;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+
+
-
+ id="g65"
+ transform="translate(16.026354,-0.01261783)">
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:32.5464;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 68.492821,130.40139 c -0.660387,-3.6e-4 -1.19615,0.54137 -1.196944,1.21028 -3.59e-4,0.66975 0.535742,1.21278 1.196944,1.21241 0.661203,3.7e-4 1.197304,-0.54266 1.196945,-1.21241 -7.94e-4,-0.66891 -0.536557,-1.21064 -1.196945,-1.21028 z"
+ id="path60" />
-
-
-
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:32.5464;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 75.475713,130.40139 c -0.660387,-3.6e-4 -1.19615,0.54137 -1.196944,1.21028 -3.59e-4,0.66975 0.535742,1.21278 1.196944,1.21241 0.661203,3.7e-4 1.197304,-0.54266 1.196945,-1.21241 -7.94e-4,-0.66891 -0.536557,-1.21064 -1.196945,-1.21028 z"
+ id="path61" />
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:32.5464;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 68.492821,123.34691 c -0.660387,-3.6e-4 -1.19615,0.54137 -1.196944,1.21028 -3.59e-4,0.66975 0.535742,1.21278 1.196944,1.21241 0.661203,3.7e-4 1.197304,-0.54266 1.196945,-1.21241 -7.94e-4,-0.66891 -0.536557,-1.21064 -1.196945,-1.21028 z"
+ id="path62" />
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:32.5464;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 75.475713,123.34691 c -0.660387,-3.6e-4 -1.19615,0.54137 -1.196944,1.21028 -3.59e-4,0.66975 0.535742,1.21278 1.196944,1.21241 0.661203,3.7e-4 1.197304,-0.54266 1.196945,-1.21241 -7.94e-4,-0.66891 -0.536557,-1.21064 -1.196945,-1.21028 z"
+ id="path63" />
+
-
+ cx="88.002098"
+ cy="128.04007"
+ rx="5.9916534"
+ ry="5.9790349" />
+ width="10.689756"
+ height="0.23953925"
+ x="14.424759"
+ y="153.88722"
+ transform="matrix(0.8902946,-0.45538504,0.45690809,0.88951391,0,0)" />
+
+
+
+
+
+
+
diff --git a/material_maker/nodes/edit_buttons.tscn b/material_maker/nodes/edit_buttons.tscn
index 0bdec20c4..d3f1c44b5 100644
--- a/material_maker/nodes/edit_buttons.tscn
+++ b/material_maker/nodes/edit_buttons.tscn
@@ -22,21 +22,16 @@ offset_bottom = 22.0
script = ExtResource("1")
[node name="Edit" type="Button" parent="."]
-offset_right = 28.0
-offset_bottom = 22.0
+layout_mode = 2
icon = SubResource("1")
flat = true
[node name="Load" type="Button" parent="."]
-offset_left = 32.0
-offset_right = 60.0
-offset_bottom = 22.0
+layout_mode = 2
icon = SubResource("2")
flat = true
[node name="Save" type="Button" parent="."]
-offset_left = 64.0
-offset_right = 92.0
-offset_bottom = 22.0
+layout_mode = 2
icon = SubResource("3")
flat = true
diff --git a/material_maker/panels/brushes/brushes.gd b/material_maker/panels/brushes/brushes.gd
index a9aa10ef7..d56bdc762 100644
--- a/material_maker/panels/brushes/brushes.gd
+++ b/material_maker/panels/brushes/brushes.gd
@@ -5,7 +5,7 @@ func _ready():
func _on_Tree_item_activated():
var main_window = mm_globals.main_window
- var data = $Tree.get_selected().get_metadata(0)
+ var data = %Tree.get_selected().get_metadata(0)
if data != null:
main_window.get_current_project().set_brush(data)
diff --git a/material_maker/panels/brushes/brushes.tscn b/material_maker/panels/brushes/brushes.tscn
index 7b2ce94bd..3d57988f6 100644
--- a/material_maker/panels/brushes/brushes.tscn
+++ b/material_maker/panels/brushes/brushes.tscn
@@ -7,8 +7,4 @@
script = ExtResource("2")
library_manager_name = "BrushLibraryManager"
-[node name="Tree" parent="." index="3"]
-supports_drag = false
-
-[connection signal="item_activated" from="Tree" to="." method="_on_Tree_item_activated"]
-[connection signal="item_icon_double_clicked" from="Tree" to="." method="_on_Tree_item_double_clicked"]
+[connection signal="item_activated" from="Library/Tree" to="." method="_on_Tree_item_activated"]
diff --git a/material_maker/panels/paint/export.gd b/material_maker/panels/paint/export.gd
index eb95b77ef..35f829f59 100644
--- a/material_maker/panels/paint/export.gd
+++ b/material_maker/panels/paint/export.gd
@@ -24,7 +24,7 @@ func setup_material(material_textures : Dictionary) -> void:
if c == null:
continue
var channel_node = graph.get_node(c)
- channel_node.texture.set_image(material_textures[c].get_image())
+ channel_node.texture.set_texture(ImageTexture.create_from_image(material_textures[c].get_image()))
mm_deps.dependency_update("o%d_tex" % channel_node.get_instance_id(), channel_node.texture)
graph.get_node("material").all_sources_changed()
diff --git a/material_maker/panels/paint/paint.tscn b/material_maker/panels/paint/paint.tscn
index 07e7d3f95..b679f83d3 100644
--- a/material_maker/panels/paint/paint.tscn
+++ b/material_maker/panels/paint/paint.tscn
@@ -228,7 +228,7 @@ stretch = true
[node name="MainView" type="SubViewport" parent="VSplitContainer/HSplitContainer/Painter/View"]
own_world_3d = true
handle_input_locally = false
-size = Vector2i(800, 480)
+size = Vector2i(10, 10)
render_target_update_mode = 4
[node name="CameraPosition" type="Node3D" parent="VSplitContainer/HSplitContainer/Painter/View/MainView"]
@@ -643,7 +643,6 @@ mouse_filter = 2
layout_mode = 2
size_flags_vertical = 3
focus_mode = 1
-scroll_offset = Vector2(0, -308)
shader_context_defs = "uniform sampler2D mesh_normal_tex;
"
diff --git a/material_maker/panels/paint/paint_layers.gd b/material_maker/panels/paint/paint_layers.gd
index 88431e14a..fc760bdff 100644
--- a/material_maker/panels/paint/paint_layers.gd
+++ b/material_maker/panels/paint/paint_layers.gd
@@ -275,7 +275,8 @@ func apply_masks(material : ShaderMaterial, masks : Array) -> void:
func update_layers_renderer(visible_layers : Array) -> void:
for viewport in [ albedo, metallic, roughness, emission, normal, depth, occlusion ]:
while viewport.get_child_count() > 0:
- viewport.remove_child(viewport.get_child(0))
+ var child = viewport.get_child(0)
+ viewport.remove_child(child)
var color_rect : ColorRect
color_rect = ColorRect.new()
color_rect.size = normal.size
diff --git a/material_maker/panels/paint/paint_layers.tscn b/material_maker/panels/paint/paint_layers.tscn
index 404e73106..cce371f57 100644
--- a/material_maker/panels/paint/paint_layers.tscn
+++ b/material_maker/panels/paint/paint_layers.tscn
@@ -21,58 +21,42 @@ shader_parameter/depth_tex = SubResource("1")
script = ExtResource("1")
[node name="Albedo" type="SubViewport" parent="."]
-transparent_bg = true
disable_3d = true
-usage = 0
-render_target_v_flip = true
+transparent_bg = true
render_target_update_mode = 1
[node name="Metallic" type="SubViewport" parent="."]
transparent_bg = true
-usage = 0
-render_target_v_flip = true
render_target_update_mode = 1
[node name="Roughness" type="SubViewport" parent="."]
transparent_bg = true
-usage = 0
-render_target_v_flip = true
render_target_update_mode = 1
[node name="Emission" type="SubViewport" parent="."]
-transparent_bg = true
disable_3d = true
-usage = 0
-render_target_v_flip = true
+transparent_bg = true
render_target_update_mode = 1
[node name="Normal" type="SubViewport" parent="."]
-transparent_bg = true
disable_3d = true
-usage = 0
-render_target_v_flip = true
+transparent_bg = true
render_target_update_mode = 1
[node name="Depth" type="SubViewport" parent="."]
-transparent_bg = true
disable_3d = true
-usage = 0
-render_target_v_flip = true
+transparent_bg = true
render_target_update_mode = 1
[node name="Occlusion" type="SubViewport" parent="."]
-transparent_bg = true
disable_3d = true
-usage = 0
-render_target_v_flip = true
+transparent_bg = true
render_target_update_mode = 1
[node name="NormalMap" type="SubViewport" parent="."]
-size = Vector2(2048, 2048)
-transparent_bg = true
disable_3d = true
-usage = 0
-render_target_v_flip = true
+transparent_bg = true
+size = Vector2i(2048, 2048)
render_target_clear_mode = 1
render_target_update_mode = 1
diff --git a/material_maker/panels/paint/paint_project_settings.tscn b/material_maker/panels/paint/paint_project_settings.tscn
index d111fc536..802f0c537 100644
--- a/material_maker/panels/paint/paint_project_settings.tscn
+++ b/material_maker/panels/paint/paint_project_settings.tscn
@@ -5,129 +5,86 @@
[ext_resource type="Script" path="res://material_maker/panels/paint/paint_project_settings.gd" id="3"]
[node name="PaintProjectSettings" type="Window"]
-anchor_left = 0.5
-anchor_top = 0.5
-anchor_right = 0.5
-anchor_bottom = 0.5
-offset_left = -171.0
-offset_top = -86.0
-offset_right = 69.0
-offset_bottom = 85.0
-window_title = "Paint project settings"
+title = "Paint project settings"
+exclusive = true
+always_on_top = true
+extend_to_title = true
script = ExtResource("3")
-__meta__ = {
-"_edit_use_anchors_": false
-}
[node name="Margin" type="MarginContainer" parent="."]
+anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
-theme_override_constants/margin_right = 2
-theme_override_constants/margin_top = 2
theme_override_constants/margin_left = 2
+theme_override_constants/margin_top = 2
+theme_override_constants/margin_right = 2
theme_override_constants/margin_bottom = 2
-__meta__ = {
-"_edit_use_anchors_": false
-}
[node name="VBox" type="VBoxContainer" parent="Margin"]
-offset_left = 2.0
-offset_top = 2.0
-offset_right = 238.0
-offset_bottom = 169.0
+layout_mode = 2
[node name="TextureSize" type="HBoxContainer" parent="Margin/VBox"]
-offset_right = 236.0
-offset_bottom = 20.0
+layout_mode = 2
[node name="Label" type="Label" parent="Margin/VBox/TextureSize"]
-offset_top = 3.0
-offset_right = 82.0
-offset_bottom = 17.0
+layout_mode = 2
text = "Texture2D size:"
[node name="SizeOptionButton" type="OptionButton" parent="Margin/VBox/TextureSize"]
-offset_left = 86.0
-offset_right = 115.0
-offset_bottom = 20.0
+layout_mode = 2
script = ExtResource("1")
min_size = 8
max_size = 12
[node name="PaintEmission" type="CheckBox" parent="Margin/VBox"]
-offset_top = 24.0
-offset_right = 122.0
-offset_bottom = 48.0
+layout_mode = 2
size_flags_horizontal = 0
text = "Paint Emission"
[node name="PaintNormal" type="CheckBox" parent="Margin/VBox"]
-offset_top = 52.0
-offset_right = 111.0
-offset_bottom = 76.0
+layout_mode = 2
size_flags_horizontal = 0
text = "Paint Normal"
[node name="PaintDepth" type="CheckBox" parent="Margin/VBox"]
-offset_top = 80.0
-offset_right = 103.0
-offset_bottom = 104.0
+layout_mode = 2
size_flags_horizontal = 0
text = "Paint Depth"
[node name="Bump" type="HBoxContainer" parent="Margin/VBox"]
-offset_top = 108.0
-offset_right = 236.0
-offset_bottom = 132.0
+layout_mode = 2
[node name="PaintBump" type="CheckBox" parent="Margin/VBox/Bump"]
-offset_right = 157.0
-offset_bottom = 24.0
+layout_mode = 2
text = "Normals from depth"
[node name="BumpStrength" parent="Margin/VBox/Bump" instance=ExtResource("2")]
-anchor_left = 0.0
-anchor_right = 0.0
-anchor_bottom = 0.0
-offset_left = 161.0
-offset_right = 219.0
-offset_bottom = 24.0
+layout_mode = 2
step = 0.01
float_only = true
[node name="HSeparator" type="HSeparator" parent="Margin/VBox"]
-offset_top = 136.0
-offset_right = 236.0
-offset_bottom = 140.0
+layout_mode = 2
[node name="Buttons" type="HBoxContainer" parent="Margin/VBox"]
-offset_left = 24.0
-offset_top = 144.0
-offset_right = 212.0
-offset_bottom = 164.0
+layout_mode = 2
size_flags_horizontal = 4
[node name="Apply" type="Button" parent="Margin/VBox/Buttons"]
-offset_right = 60.0
-offset_bottom = 20.0
custom_minimum_size = Vector2(60, 0)
+layout_mode = 2
text = "Apply"
[node name="OK" type="Button" parent="Margin/VBox/Buttons"]
-offset_left = 64.0
-offset_right = 124.0
-offset_bottom = 20.0
custom_minimum_size = Vector2(60, 0)
+layout_mode = 2
text = "OK"
[node name="Cancel" type="Button" parent="Margin/VBox/Buttons"]
-offset_left = 128.0
-offset_right = 188.0
-offset_bottom = 20.0
custom_minimum_size = Vector2(60, 0)
+layout_mode = 2
text = "Cancel"
-[connection signal="popup_hide" from="." to="." method="queue_free"]
[connection signal="minimum_size_changed" from="Margin" to="." method="_on_Margin_minimum_size_changed"]
[connection signal="pressed" from="Margin/VBox/Buttons/Apply" to="." method="apply_settings"]
[connection signal="pressed" from="Margin/VBox/Buttons/OK" to="." method="ok"]
diff --git a/material_maker/tools/painter/painter.gd b/material_maker/tools/painter/painter.gd
index 643f15126..f5907585a 100644
--- a/material_maker/tools/painter/painter.gd
+++ b/material_maker/tools/painter/painter.gd
@@ -478,7 +478,7 @@ func update_brush(update_shaders : bool = false):
definitions += pattern_shader_code.defs
var global_definitions : String = ""
- global_definitions += brush_shader_code.get_globals_string()
+ global_definitions += brush_shader_code.get_globals_string(definitions+brush_code+pattern_code)
var replaces : Dictionary = {
BRUSH_MODE="\""+get_brush_mode()+"\"",
diff --git a/material_maker/windows/new_painter/new_painter.tscn b/material_maker/windows/new_painter/new_painter.tscn
index cf82bb174..ed2ecaf72 100644
--- a/material_maker/windows/new_painter/new_painter.tscn
+++ b/material_maker/windows/new_painter/new_painter.tscn
@@ -75,6 +75,7 @@ ambient_light_source = 3
ambient_light_color = Color(1, 1, 1, 1)
[node name="NewPainterWindow" type="Window"]
+title = "New Paint Project"
size = Vector2i(500, 300)
script = ExtResource("2")
mesh_material = SubResource("ShaderMaterial_5x24r")
@@ -133,7 +134,7 @@ stretch = true
own_world_3d = true
world_3d = SubResource("World3D_pmwks")
handle_input_locally = false
-size = Vector2i(360, 257)
+size = Vector2i(2, 2)
render_target_update_mode = 4
[node name="MeshPivot" type="Node3D" parent="VBoxContainer/Main/SubViewportContainer/SubViewport"]