diff --git a/addons/material_maker/library.gd b/addons/material_maker/library.gd index 6abb50d..598827c 100644 --- a/addons/material_maker/library.gd +++ b/addons/material_maker/library.gd @@ -109,28 +109,40 @@ func add_item(item, item_name, item_icon = null, item_parent = null, force_expan new_parent.set_text(0, prefix) return add_item(item, suffix, item_icon, new_parent, force_expand) -func serialize_library(array : Array, library_name : String = "", item : TreeItem = null, icon_path : String = "") -> void: +func get_item_path(item : TreeItem) -> String: + var item_path = item.get_text(0) + var item_parent = item.get_parent() + while item_parent != tree.get_root(): + item_path = item_parent.get_text(0)+"/"+item_path + item_parent = item_parent.get_parent() + return item_path + +func get_icon_name(item_name : String) -> String: + return item_name.to_lower().replace("/", "_").replace(" ", "_") + +func serialize_library(array : Array, library_name : String = "", item : TreeItem = null, icon_dir : String = "") -> void: if item == null: item = tree.get_root() item = item.get_children() while item != null: if item.get_metadata(0) != null: var m : Dictionary = item.get_metadata(0) - if icon_path != "": - pass if library_name == "" or (m.has("library") and m.library == library_name): var copy : Dictionary = m.duplicate() copy.erase("library") copy.collapsed = item.collapsed + if icon_dir != "" and m.has("icon"): + var src_path = m.library.get_basename()+"/"+m.icon+".png" + var icon_name : String = get_icon_name(get_item_path(item)) + var icon_path = icon_dir+"/"+icon_name+".png" + var dir : Directory = Directory.new() + dir.copy(src_path, icon_path) + copy.icon = icon_name array.append(copy) elif !item.collapsed: - var item_path = item.get_text(0) - var item_parent = item.get_parent() - while item_parent != tree.get_root(): - item_path = item_parent.get_text(0)+"/"+item_path - item_parent = item_parent.get_parent() + var item_path = get_item_path(item) array.append({ tree_item=item_path, collapsed=false }) - serialize_library(array, library_name, item) + serialize_library(array, library_name, item, icon_dir) item = item.get_next() func save_library(library_name : String, item : TreeItem = null) -> void: diff --git a/addons/material_maker/library/base.json b/addons/material_maker/library/base.json index b333481..60ce7ae 100644 --- a/addons/material_maker/library/base.json +++ b/addons/material_maker/library/base.json @@ -6,7 +6,7 @@ }, { "collapsed": true, - "icon": "uniform", + "icon": "simple_uniform", "name": "uniform", "parameters": { "color": { @@ -22,7 +22,7 @@ }, { "collapsed": true, - "icon": "polygon", + "icon": "simple_shape", "name": "shape", "parameters": { "edge": 0.051546, @@ -35,7 +35,7 @@ }, { "collapsed": true, - "icon": "star", + "icon": "simple_shape_star", "name": "shape", "parameters": { "edge": 0.2, @@ -48,7 +48,7 @@ }, { "collapsed": true, - "icon": "curved_star", + "icon": "simple_shape_curved_star", "name": "shape", "parameters": { "edge": 0.628866, @@ -61,7 +61,7 @@ }, { "collapsed": true, - "icon": "rays", + "icon": "simple_shape_rays", "name": "shape", "parameters": { "edge": 0.628866, @@ -74,7 +74,7 @@ }, { "collapsed": true, - "icon": "circle", + "icon": "simple_shape_circle", "name": "shape", "parameters": { "edge": 0.2, @@ -87,7 +87,7 @@ }, { "collapsed": true, - "icon": "image", + "icon": "simple_image", "name": "image", "parameters": { "file_path": "res://addons/material_maker/nodes/image/godot_logo.png", @@ -118,7 +118,7 @@ "to_port": 0 } ], - "icon": "gradient", + "icon": "simple_gradient", "label": "Gradient", "name": "graph", "nodes": [ @@ -328,7 +328,7 @@ "to_port": 0 } ], - "icon": "radial", + "icon": "simple_gradient_radial", "label": "Radial Gradient", "name": "graph", "nodes": [ @@ -520,7 +520,7 @@ "to_port": 0 } ], - "icon": "circular", + "icon": "simple_gradient_circular", "label": "Circular Gradient", "name": "graph", "nodes": [ @@ -713,13 +713,241 @@ "tree_item": "Simple/Gradient/Circular", "type": "graph" }, + { + "collapsed": true, + "icon": "simple_sdf_shapes_sdcircle", + "name": "sdcircle", + "parameters": { + "cx": 0, + "cy": 0, + "r": 0.25 + }, + "tree_item": "Simple/SDF/Shapes/sdCircle", + "type": "sdcircle" + }, + { + "collapsed": true, + "icon": "simple_sdf_shapes_sdbox", + "name": "sdbox", + "parameters": { + "cx": 0, + "cy": 0, + "h": 0.2, + "r": 0.3, + "w": 0.3 + }, + "tree_item": "Simple/SDF/Shapes/sdBox", + "type": "sdbox" + }, + { + "collapsed": true, + "icon": "simple_sdf_shapes_sdline", + "name": "sdline", + "parameters": { + "ax": 0.2, + "ay": 0.2, + "bx": 0.8, + "by": 0.8, + "cx": 0, + "cy": 0, + "h": 0.2, + "r": 0.3, + "w": 0.3 + }, + "tree_item": "Simple/SDF/Shapes/sdLine", + "type": "sdline" + }, + { + "collapsed": true, + "icon": "simple_sdf_shapes_sdrhombus", + "name": "sdrhombus", + "parameters": { + "cx": 0, + "cy": 0, + "h": 0.2, + "r": 0.3, + "w": 0.3 + }, + "tree_item": "Simple/SDF/Shapes/sdRhombus", + "type": "sdrhombus" + }, + { + "collapsed": true, + "icon": "simple_sdf_operators_sdboolean", + "name": "sdboolean", + "parameters": { + "bevel": 0, + "cx": 0, + "cy": 0, + "h": 0.08, + "op": 0, + "r": 0.3, + "w": 0.28 + }, + "tree_item": "Simple/SDF/Operators/sdBoolean", + "type": "sdboolean" + }, + { + "collapsed": true, + "icon": "simple_sdf_operators_sdsmoothboolean", + "name": "sdsmoothboolean", + "parameters": { + "bevel": 0, + "cx": 0, + "cy": 0, + "h": 0.08, + "k": 0.15, + "op": 0, + "r": 0.3, + "w": 0.28 + }, + "shader_model": { + "code": "", + "global": "float sdSmoothUnion( float d1, float d2, float k ) {\n float h = clamp( 0.5 + 0.5*(d2-d1)/k, 0.0, 1.0 );\n return mix( d2, d1, h ) - k*h*(1.0-h); }\n\nfloat sdSmoothSubtraction( float d1, float d2, float k ) {\n float h = clamp( 0.5 - 0.5*(d2+d1)/k, 0.0, 1.0 );\n return mix( d2, -d1, h ) + k*h*(1.0-h); }\n\nfloat sdSmoothIntersection( float d1, float d2, float k ) {\n float h = clamp( 0.5 - 0.5*(d2-d1)/k, 0.0, 1.0 );\n return mix( d2, d1, h ) + k*h*(1.0-h); }\n", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in1", + "type": "f" + }, + { + "default": "0.0", + "label": "", + "name": "in2", + "type": "f" + } + ], + "instance": "", + "name": "sdSmoothBoolean", + "outputs": [ + { + "f": "sdSmooth$op($in1($uv), $in2($uv), $k)", + "type": "f" + } + ], + "parameters": [ + { + "default": 0, + "label": "", + "name": "op", + "type": "enum", + "values": [ + { + "name": "Union", + "value": "Union" + }, + { + "name": "Subtraction", + "value": "Subtraction" + }, + { + "name": "Intersection", + "value": "Intersection" + } + ] + }, + { + "default": 0, + "label": "", + "max": 1, + "min": 0, + "name": "k", + "step": 0.01, + "type": "float" + } + ] + }, + "tree_item": "Simple/SDF/Operators/sdSmoothBoolean", + "type": "shader" + }, + { + "collapsed": true, + "icon": "simple_sdf_operators_sdroundedshape", + "name": "sdroundedshape", + "parameters": { + "bevel": 0, + "cx": 0, + "cy": 0, + "h": 0.08, + "k": 0.15, + "op": 0, + "r": 0.1, + "w": 0.28 + }, + "tree_item": "Simple/SDF/Operators/sdRoundedShape", + "type": "sdroundedshape" + }, + { + "collapsed": true, + "icon": "simple_sdf_operators_sdannularshape", + "name": "sdannularshape", + "parameters": { + "bevel": 0, + "cx": 0, + "cy": 0, + "h": 0.08, + "k": 0.15, + "op": 0, + "r": 0.05, + "w": 0.28 + }, + "tree_item": "Simple/SDF/Operators/sdAnnularShape", + "type": "sdannularshape" + }, + { + "collapsed": true, + "icon": "simple_sdf_operators_sdshow", + "name": "sdshow", + "parameters": { + "bevel": 0.1, + "cx": 0, + "cy": 0, + "h": 0.08, + "r": 0.3, + "w": 0.28 + }, + "shader_model": { + "code": "", + "global": "", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in", + "type": "f" + } + ], + "instance": "", + "name": "sdShow", + "outputs": [ + { + "f": "clamp(-$in($uv)/max($bevel, 0.00001), 0.0, 1.0)", + "type": "f" + } + ], + "parameters": [ + { + "default": 0, + "label": "Bevel", + "max": 1, + "min": 0, + "name": "bevel", + "step": 0.01, + "type": "float" + } + ] + }, + "tree_item": "Simple/SDF/Operators/sdShow", + "type": "shader" + }, { "collapsed": false, "tree_item": "Pattern" }, { "collapsed": true, - "icon": "pattern", + "icon": "pattern_generic", "parameters": { "mix": 0, "x_scale": 4, @@ -732,7 +960,7 @@ }, { "collapsed": true, - "icon": "checkerboard", + "icon": "pattern_generic_checkerboard", "name": "pattern", "parameters": { "mix": 4, @@ -746,7 +974,7 @@ }, { "collapsed": true, - "icon": "bricks", + "icon": "pattern_bricks", "parameters": { "bevel": 0.1, "columns": 3, @@ -759,7 +987,7 @@ }, { "collapsed": true, - "icon": "tiles", + "icon": "pattern_bricks_tiles", "parameters": { "bevel": 0.05, "columns": 4, @@ -772,7 +1000,7 @@ }, { "collapsed": true, - "icon": "basketweave", + "icon": "pattern_bricks_basketweave", "parameters": { "bevel": 0.05, "columns": 2, @@ -787,7 +1015,7 @@ }, { "collapsed": true, - "icon": "herringbone", + "icon": "pattern_bricks_herringbone", "parameters": { "bevel": 0.05, "columns": 2, @@ -802,7 +1030,7 @@ }, { "collapsed": true, - "icon": "spanishbond", + "icon": "pattern_bricks_spanishbond", "parameters": { "bevel": 0.05, "columns": 2, @@ -817,7 +1045,7 @@ }, { "collapsed": true, - "icon": "weave", + "icon": "pattern_weave", "name": "weave", "parameters": { "columns": 4, @@ -828,7 +1056,7 @@ }, { "collapsed": true, - "icon": "truchet", + "icon": "pattern_truchet", "name": "truchet", "parameters": { "Size": 4, @@ -841,7 +1069,7 @@ }, { "collapsed": true, - "icon": "runes", + "icon": "pattern_runes", "name": "runes", "parameters": { "columns": 4, @@ -890,7 +1118,7 @@ "to_port": 0 } ], - "icon": "fibers", + "icon": "pattern_fibers", "label": "Fibers", "name": "graph", "nodes": [ @@ -1070,7 +1298,7 @@ }, { "collapsed": true, - "icon": "scratches", + "icon": "pattern_scratches", "name": "scratches", "parameters": { "Randomness": 0.5, @@ -1097,7 +1325,7 @@ }, { "collapsed": true, - "icon": "perlin", + "icon": "noise_perlin", "parameters": { "iterations": 3, "persistence": 0.5, @@ -1135,7 +1363,7 @@ "to_port": 0 } ], - "icon": "warp1", + "icon": "noise_perlin_warp1", "label": "Warp1", "name": "graph", "nodes": [ @@ -1342,7 +1570,7 @@ "to_port": 0 } ], - "icon": "warp2", + "icon": "noise_perlin_warp2", "label": "Warp2", "name": "graph", "nodes": [ @@ -1527,7 +1755,7 @@ }, { "collapsed": true, - "icon": "voronoi", + "icon": "noise_voronoi", "parameters": { "intensity": 1, "scale_x": 4, @@ -1552,7 +1780,7 @@ }, { "collapsed": true, - "icon": "colorize", + "icon": "filter_colorize", "parameters": { "gradient": [ { @@ -1574,7 +1802,7 @@ }, { "collapsed": true, - "icon": "invert", + "icon": "filter_colorize_invert", "parameters": { "gradient": [ { @@ -1596,7 +1824,7 @@ }, { "collapsed": true, - "icon": "rainbow", + "icon": "filter_colorize_rainbow", "name": "colorize", "parameters": { "gradient": { @@ -1645,7 +1873,7 @@ }, { "collapsed": true, - "icon": "blend", + "icon": "filter_blend", "parameters": { "amount": 0.5, "blend_type": 0 @@ -1665,7 +1893,7 @@ }, { "collapsed": true, - "icon": "normal_map", + "icon": "filter_normal_map", "parameters": { "amount": 0.5 }, @@ -1674,7 +1902,7 @@ }, { "collapsed": true, - "icon": "blur", + "icon": "filter_blur", "name": "gaussian_blur", "parameters": { "param0": 9, @@ -1686,7 +1914,7 @@ }, { "collapsed": true, - "icon": "directional", + "icon": "filter_blur_directional", "name": "directional_blur", "parameters": { "param0": 9, @@ -1698,7 +1926,7 @@ }, { "collapsed": true, - "icon": "emboss", + "icon": "filter_emboss", "name": "emboss_2", "parameters": { "param0": 9, @@ -1723,7 +1951,7 @@ }, { "collapsed": true, - "icon": "mirror", + "icon": "transform_mirror", "name": "mirror", "parameters": { "direction": 0, @@ -1734,7 +1962,7 @@ }, { "collapsed": true, - "icon": "kaleidoscope", + "icon": "transform_kaleidoscope", "name": "kaleidoscope", "parameters": { "count": 5, @@ -1746,7 +1974,7 @@ }, { "collapsed": true, - "icon": "warp", + "icon": "transform_warp", "name": "warp", "parameters": { "amount": 0.1, @@ -1762,7 +1990,7 @@ }, { "collapsed": true, - "icon": "buffer", + "icon": "miscellaneous_buffer", "tree_item": "Miscellaneous/Buffer", "type": "buffer" }, @@ -1776,7 +2004,7 @@ }, { "collapsed": true, - "icon": "switch", + "icon": "miscellaneous_switch", "tree_item": "Miscellaneous/Switch", "type": "switch" }, @@ -1803,7 +2031,7 @@ }, { "collapsed": true, - "icon": "debug", + "icon": "miscellaneous_debug", "tree_item": "Miscellaneous/Debug", "type": "debug" } diff --git a/addons/material_maker/library/base/blend.png b/addons/material_maker/library/base/filter_blend.png similarity index 100% rename from addons/material_maker/library/base/blend.png rename to addons/material_maker/library/base/filter_blend.png diff --git a/addons/material_maker/library/base/blur.png b/addons/material_maker/library/base/filter_blur.png similarity index 100% rename from addons/material_maker/library/base/blur.png rename to addons/material_maker/library/base/filter_blur.png diff --git a/addons/material_maker/library/base/directional.png b/addons/material_maker/library/base/filter_blur_directional.png similarity index 100% rename from addons/material_maker/library/base/directional.png rename to addons/material_maker/library/base/filter_blur_directional.png diff --git a/addons/material_maker/library/base/colorize.png b/addons/material_maker/library/base/filter_colorize.png similarity index 100% rename from addons/material_maker/library/base/colorize.png rename to addons/material_maker/library/base/filter_colorize.png diff --git a/addons/material_maker/library/base/invert.png b/addons/material_maker/library/base/filter_colorize_invert.png similarity index 100% rename from addons/material_maker/library/base/invert.png rename to addons/material_maker/library/base/filter_colorize_invert.png diff --git a/addons/material_maker/library/base/rainbow.png b/addons/material_maker/library/base/filter_colorize_rainbow.png similarity index 100% rename from addons/material_maker/library/base/rainbow.png rename to addons/material_maker/library/base/filter_colorize_rainbow.png diff --git a/addons/material_maker/library/base/emboss.png b/addons/material_maker/library/base/filter_emboss.png similarity index 100% rename from addons/material_maker/library/base/emboss.png rename to addons/material_maker/library/base/filter_emboss.png diff --git a/addons/material_maker/library/base/normal_map.png b/addons/material_maker/library/base/filter_normal_map.png similarity index 100% rename from addons/material_maker/library/base/normal_map.png rename to addons/material_maker/library/base/filter_normal_map.png diff --git a/addons/material_maker/library/base/buffer.png b/addons/material_maker/library/base/miscellaneous_buffer.png similarity index 100% rename from addons/material_maker/library/base/buffer.png rename to addons/material_maker/library/base/miscellaneous_buffer.png diff --git a/addons/material_maker/library/base/debug.png b/addons/material_maker/library/base/miscellaneous_debug.png similarity index 100% rename from addons/material_maker/library/base/debug.png rename to addons/material_maker/library/base/miscellaneous_debug.png diff --git a/addons/material_maker/library/base/switch.png b/addons/material_maker/library/base/miscellaneous_switch.png similarity index 100% rename from addons/material_maker/library/base/switch.png rename to addons/material_maker/library/base/miscellaneous_switch.png diff --git a/addons/material_maker/library/base/perlin.png b/addons/material_maker/library/base/noise_perlin.png similarity index 100% rename from addons/material_maker/library/base/perlin.png rename to addons/material_maker/library/base/noise_perlin.png diff --git a/addons/material_maker/library/base/warp1.png b/addons/material_maker/library/base/noise_perlin_warp1.png similarity index 100% rename from addons/material_maker/library/base/warp1.png rename to addons/material_maker/library/base/noise_perlin_warp1.png diff --git a/addons/material_maker/library/base/warp2.png b/addons/material_maker/library/base/noise_perlin_warp2.png similarity index 100% rename from addons/material_maker/library/base/warp2.png rename to addons/material_maker/library/base/noise_perlin_warp2.png diff --git a/addons/material_maker/library/base/voronoi.png b/addons/material_maker/library/base/noise_voronoi.png similarity index 100% rename from addons/material_maker/library/base/voronoi.png rename to addons/material_maker/library/base/noise_voronoi.png diff --git a/addons/material_maker/library/base/bricks.png b/addons/material_maker/library/base/pattern_bricks.png similarity index 100% rename from addons/material_maker/library/base/bricks.png rename to addons/material_maker/library/base/pattern_bricks.png diff --git a/addons/material_maker/library/base/basketweave.png b/addons/material_maker/library/base/pattern_bricks_basketweave.png similarity index 100% rename from addons/material_maker/library/base/basketweave.png rename to addons/material_maker/library/base/pattern_bricks_basketweave.png diff --git a/addons/material_maker/library/base/herringbone.png b/addons/material_maker/library/base/pattern_bricks_herringbone.png similarity index 100% rename from addons/material_maker/library/base/herringbone.png rename to addons/material_maker/library/base/pattern_bricks_herringbone.png diff --git a/addons/material_maker/library/base/spanishbond.png b/addons/material_maker/library/base/pattern_bricks_spanishbond.png similarity index 100% rename from addons/material_maker/library/base/spanishbond.png rename to addons/material_maker/library/base/pattern_bricks_spanishbond.png diff --git a/addons/material_maker/library/base/tiles.png b/addons/material_maker/library/base/pattern_bricks_tiles.png similarity index 100% rename from addons/material_maker/library/base/tiles.png rename to addons/material_maker/library/base/pattern_bricks_tiles.png diff --git a/addons/material_maker/library/base/fibers.png b/addons/material_maker/library/base/pattern_fibers.png similarity index 100% rename from addons/material_maker/library/base/fibers.png rename to addons/material_maker/library/base/pattern_fibers.png diff --git a/addons/material_maker/library/base/pattern.png b/addons/material_maker/library/base/pattern_generic.png similarity index 100% rename from addons/material_maker/library/base/pattern.png rename to addons/material_maker/library/base/pattern_generic.png diff --git a/addons/material_maker/library/base/checkerboard.png b/addons/material_maker/library/base/pattern_generic_checkerboard.png similarity index 100% rename from addons/material_maker/library/base/checkerboard.png rename to addons/material_maker/library/base/pattern_generic_checkerboard.png diff --git a/addons/material_maker/library/base/runes.png b/addons/material_maker/library/base/pattern_runes.png similarity index 100% rename from addons/material_maker/library/base/runes.png rename to addons/material_maker/library/base/pattern_runes.png diff --git a/addons/material_maker/library/base/scratches.png b/addons/material_maker/library/base/pattern_scratches.png similarity index 100% rename from addons/material_maker/library/base/scratches.png rename to addons/material_maker/library/base/pattern_scratches.png diff --git a/addons/material_maker/library/base/truchet.png b/addons/material_maker/library/base/pattern_truchet.png similarity index 100% rename from addons/material_maker/library/base/truchet.png rename to addons/material_maker/library/base/pattern_truchet.png diff --git a/addons/material_maker/library/base/weave.png b/addons/material_maker/library/base/pattern_weave.png similarity index 100% rename from addons/material_maker/library/base/weave.png rename to addons/material_maker/library/base/pattern_weave.png diff --git a/addons/material_maker/library/base/gradient.png b/addons/material_maker/library/base/simple_gradient.png similarity index 100% rename from addons/material_maker/library/base/gradient.png rename to addons/material_maker/library/base/simple_gradient.png diff --git a/addons/material_maker/library/base/circular.png b/addons/material_maker/library/base/simple_gradient_circular.png similarity index 100% rename from addons/material_maker/library/base/circular.png rename to addons/material_maker/library/base/simple_gradient_circular.png diff --git a/addons/material_maker/library/base/radial.png b/addons/material_maker/library/base/simple_gradient_radial.png similarity index 100% rename from addons/material_maker/library/base/radial.png rename to addons/material_maker/library/base/simple_gradient_radial.png diff --git a/addons/material_maker/library/base/image.png b/addons/material_maker/library/base/simple_image.png similarity index 100% rename from addons/material_maker/library/base/image.png rename to addons/material_maker/library/base/simple_image.png diff --git a/addons/material_maker/library/base/simple_sdf_operators_sdannularshape.png b/addons/material_maker/library/base/simple_sdf_operators_sdannularshape.png new file mode 100644 index 0000000..f86793b Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_operators_sdannularshape.png differ diff --git a/addons/material_maker/library/base/simple_sdf_operators_sdboolean.png b/addons/material_maker/library/base/simple_sdf_operators_sdboolean.png new file mode 100644 index 0000000..a23356b Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_operators_sdboolean.png differ diff --git a/addons/material_maker/library/base/simple_sdf_operators_sdroundedshape.png b/addons/material_maker/library/base/simple_sdf_operators_sdroundedshape.png new file mode 100644 index 0000000..49e4624 Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_operators_sdroundedshape.png differ diff --git a/addons/material_maker/library/base/simple_sdf_operators_sdshow.png b/addons/material_maker/library/base/simple_sdf_operators_sdshow.png new file mode 100644 index 0000000..eaf638b Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_operators_sdshow.png differ diff --git a/addons/material_maker/library/base/simple_sdf_operators_sdsmoothboolean.png b/addons/material_maker/library/base/simple_sdf_operators_sdsmoothboolean.png new file mode 100644 index 0000000..45e2a99 Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_operators_sdsmoothboolean.png differ diff --git a/addons/material_maker/library/base/simple_sdf_shapes_sdbox.png b/addons/material_maker/library/base/simple_sdf_shapes_sdbox.png new file mode 100644 index 0000000..3e65d3d Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_shapes_sdbox.png differ diff --git a/addons/material_maker/library/base/simple_sdf_shapes_sdcircle.png b/addons/material_maker/library/base/simple_sdf_shapes_sdcircle.png new file mode 100644 index 0000000..61924e0 Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_shapes_sdcircle.png differ diff --git a/addons/material_maker/library/base/simple_sdf_shapes_sdline.png b/addons/material_maker/library/base/simple_sdf_shapes_sdline.png new file mode 100644 index 0000000..0c783f9 Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_shapes_sdline.png differ diff --git a/addons/material_maker/library/base/simple_sdf_shapes_sdrhombus.png b/addons/material_maker/library/base/simple_sdf_shapes_sdrhombus.png new file mode 100644 index 0000000..8be1c67 Binary files /dev/null and b/addons/material_maker/library/base/simple_sdf_shapes_sdrhombus.png differ diff --git a/addons/material_maker/library/base/polygon.png b/addons/material_maker/library/base/simple_shape.png similarity index 100% rename from addons/material_maker/library/base/polygon.png rename to addons/material_maker/library/base/simple_shape.png diff --git a/addons/material_maker/library/base/circle.png b/addons/material_maker/library/base/simple_shape_circle.png similarity index 100% rename from addons/material_maker/library/base/circle.png rename to addons/material_maker/library/base/simple_shape_circle.png diff --git a/addons/material_maker/library/base/curved_star.png b/addons/material_maker/library/base/simple_shape_curved_star.png similarity index 100% rename from addons/material_maker/library/base/curved_star.png rename to addons/material_maker/library/base/simple_shape_curved_star.png diff --git a/addons/material_maker/library/base/rays.png b/addons/material_maker/library/base/simple_shape_rays.png similarity index 100% rename from addons/material_maker/library/base/rays.png rename to addons/material_maker/library/base/simple_shape_rays.png diff --git a/addons/material_maker/library/base/star.png b/addons/material_maker/library/base/simple_shape_star.png similarity index 100% rename from addons/material_maker/library/base/star.png rename to addons/material_maker/library/base/simple_shape_star.png diff --git a/addons/material_maker/library/base/uniform.png b/addons/material_maker/library/base/simple_uniform.png similarity index 100% rename from addons/material_maker/library/base/uniform.png rename to addons/material_maker/library/base/simple_uniform.png diff --git a/addons/material_maker/library/base/kaleidoscope.png b/addons/material_maker/library/base/transform_kaleidoscope.png similarity index 100% rename from addons/material_maker/library/base/kaleidoscope.png rename to addons/material_maker/library/base/transform_kaleidoscope.png diff --git a/addons/material_maker/library/base/mirror.png b/addons/material_maker/library/base/transform_mirror.png similarity index 100% rename from addons/material_maker/library/base/mirror.png rename to addons/material_maker/library/base/transform_mirror.png diff --git a/addons/material_maker/library/base/warp.png b/addons/material_maker/library/base/transform_warp.png similarity index 100% rename from addons/material_maker/library/base/warp.png rename to addons/material_maker/library/base/transform_warp.png diff --git a/addons/material_maker/main_window.gd b/addons/material_maker/main_window.gd index 362ea64..bfac63f 100644 --- a/addons/material_maker/main_window.gd +++ b/addons/material_maker/main_window.gd @@ -348,7 +348,7 @@ func do_add_to_user_library(name, nodes) -> void: var result = nodes[0].generator.render(0, 64) while result is GDScriptFunctionState: result = yield(result, "completed") - result.save_to_file("user://library/user/"+data.icon+".png") + result.save_to_file("user://library/user/"+library.get_icon_name(name)+".png") result.release() library.add_item(data, name, library.get_preview_texture(data)) library.save_library("user://library/user.json")