Updated library export to generate unique icon names
@ -109,28 +109,40 @@ func add_item(item, item_name, item_icon = null, item_parent = null, force_expan
|
|||||||
new_parent.set_text(0, prefix)
|
new_parent.set_text(0, prefix)
|
||||||
return add_item(item, suffix, item_icon, new_parent, force_expand)
|
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:
|
if item == null:
|
||||||
item = tree.get_root()
|
item = tree.get_root()
|
||||||
item = item.get_children()
|
item = item.get_children()
|
||||||
while item != null:
|
while item != null:
|
||||||
if item.get_metadata(0) != null:
|
if item.get_metadata(0) != null:
|
||||||
var m : Dictionary = item.get_metadata(0)
|
var m : Dictionary = item.get_metadata(0)
|
||||||
if icon_path != "":
|
|
||||||
pass
|
|
||||||
if library_name == "" or (m.has("library") and m.library == library_name):
|
if library_name == "" or (m.has("library") and m.library == library_name):
|
||||||
var copy : Dictionary = m.duplicate()
|
var copy : Dictionary = m.duplicate()
|
||||||
copy.erase("library")
|
copy.erase("library")
|
||||||
copy.collapsed = item.collapsed
|
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)
|
array.append(copy)
|
||||||
elif !item.collapsed:
|
elif !item.collapsed:
|
||||||
var item_path = item.get_text(0)
|
var item_path = get_item_path(item)
|
||||||
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()
|
|
||||||
array.append({ tree_item=item_path, collapsed=false })
|
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()
|
item = item.get_next()
|
||||||
|
|
||||||
func save_library(library_name : String, item : TreeItem = null) -> void:
|
func save_library(library_name : String, item : TreeItem = null) -> void:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "uniform",
|
"icon": "simple_uniform",
|
||||||
"name": "uniform",
|
"name": "uniform",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"color": {
|
"color": {
|
||||||
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "polygon",
|
"icon": "simple_shape",
|
||||||
"name": "shape",
|
"name": "shape",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"edge": 0.051546,
|
"edge": 0.051546,
|
||||||
@ -35,7 +35,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "star",
|
"icon": "simple_shape_star",
|
||||||
"name": "shape",
|
"name": "shape",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"edge": 0.2,
|
"edge": 0.2,
|
||||||
@ -48,7 +48,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "curved_star",
|
"icon": "simple_shape_curved_star",
|
||||||
"name": "shape",
|
"name": "shape",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"edge": 0.628866,
|
"edge": 0.628866,
|
||||||
@ -61,7 +61,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "rays",
|
"icon": "simple_shape_rays",
|
||||||
"name": "shape",
|
"name": "shape",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"edge": 0.628866,
|
"edge": 0.628866,
|
||||||
@ -74,7 +74,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "circle",
|
"icon": "simple_shape_circle",
|
||||||
"name": "shape",
|
"name": "shape",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"edge": 0.2,
|
"edge": 0.2,
|
||||||
@ -87,7 +87,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "image",
|
"icon": "simple_image",
|
||||||
"name": "image",
|
"name": "image",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"file_path": "res://addons/material_maker/nodes/image/godot_logo.png",
|
"file_path": "res://addons/material_maker/nodes/image/godot_logo.png",
|
||||||
@ -118,7 +118,7 @@
|
|||||||
"to_port": 0
|
"to_port": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "gradient",
|
"icon": "simple_gradient",
|
||||||
"label": "Gradient",
|
"label": "Gradient",
|
||||||
"name": "graph",
|
"name": "graph",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
@ -328,7 +328,7 @@
|
|||||||
"to_port": 0
|
"to_port": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "radial",
|
"icon": "simple_gradient_radial",
|
||||||
"label": "Radial Gradient",
|
"label": "Radial Gradient",
|
||||||
"name": "graph",
|
"name": "graph",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
@ -520,7 +520,7 @@
|
|||||||
"to_port": 0
|
"to_port": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "circular",
|
"icon": "simple_gradient_circular",
|
||||||
"label": "Circular Gradient",
|
"label": "Circular Gradient",
|
||||||
"name": "graph",
|
"name": "graph",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
@ -713,13 +713,241 @@
|
|||||||
"tree_item": "Simple/Gradient/Circular",
|
"tree_item": "Simple/Gradient/Circular",
|
||||||
"type": "graph"
|
"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,
|
"collapsed": false,
|
||||||
"tree_item": "Pattern"
|
"tree_item": "Pattern"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "pattern",
|
"icon": "pattern_generic",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"mix": 0,
|
"mix": 0,
|
||||||
"x_scale": 4,
|
"x_scale": 4,
|
||||||
@ -732,7 +960,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "checkerboard",
|
"icon": "pattern_generic_checkerboard",
|
||||||
"name": "pattern",
|
"name": "pattern",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"mix": 4,
|
"mix": 4,
|
||||||
@ -746,7 +974,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "bricks",
|
"icon": "pattern_bricks",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"bevel": 0.1,
|
"bevel": 0.1,
|
||||||
"columns": 3,
|
"columns": 3,
|
||||||
@ -759,7 +987,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "tiles",
|
"icon": "pattern_bricks_tiles",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"bevel": 0.05,
|
"bevel": 0.05,
|
||||||
"columns": 4,
|
"columns": 4,
|
||||||
@ -772,7 +1000,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "basketweave",
|
"icon": "pattern_bricks_basketweave",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"bevel": 0.05,
|
"bevel": 0.05,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
@ -787,7 +1015,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "herringbone",
|
"icon": "pattern_bricks_herringbone",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"bevel": 0.05,
|
"bevel": 0.05,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
@ -802,7 +1030,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "spanishbond",
|
"icon": "pattern_bricks_spanishbond",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"bevel": 0.05,
|
"bevel": 0.05,
|
||||||
"columns": 2,
|
"columns": 2,
|
||||||
@ -817,7 +1045,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "weave",
|
"icon": "pattern_weave",
|
||||||
"name": "weave",
|
"name": "weave",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"columns": 4,
|
"columns": 4,
|
||||||
@ -828,7 +1056,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "truchet",
|
"icon": "pattern_truchet",
|
||||||
"name": "truchet",
|
"name": "truchet",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"Size": 4,
|
"Size": 4,
|
||||||
@ -841,7 +1069,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "runes",
|
"icon": "pattern_runes",
|
||||||
"name": "runes",
|
"name": "runes",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"columns": 4,
|
"columns": 4,
|
||||||
@ -890,7 +1118,7 @@
|
|||||||
"to_port": 0
|
"to_port": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fibers",
|
"icon": "pattern_fibers",
|
||||||
"label": "Fibers",
|
"label": "Fibers",
|
||||||
"name": "graph",
|
"name": "graph",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
@ -1070,7 +1298,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "scratches",
|
"icon": "pattern_scratches",
|
||||||
"name": "scratches",
|
"name": "scratches",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"Randomness": 0.5,
|
"Randomness": 0.5,
|
||||||
@ -1097,7 +1325,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "perlin",
|
"icon": "noise_perlin",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"iterations": 3,
|
"iterations": 3,
|
||||||
"persistence": 0.5,
|
"persistence": 0.5,
|
||||||
@ -1135,7 +1363,7 @@
|
|||||||
"to_port": 0
|
"to_port": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "warp1",
|
"icon": "noise_perlin_warp1",
|
||||||
"label": "Warp1",
|
"label": "Warp1",
|
||||||
"name": "graph",
|
"name": "graph",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
@ -1342,7 +1570,7 @@
|
|||||||
"to_port": 0
|
"to_port": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "warp2",
|
"icon": "noise_perlin_warp2",
|
||||||
"label": "Warp2",
|
"label": "Warp2",
|
||||||
"name": "graph",
|
"name": "graph",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
@ -1527,7 +1755,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "voronoi",
|
"icon": "noise_voronoi",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"intensity": 1,
|
"intensity": 1,
|
||||||
"scale_x": 4,
|
"scale_x": 4,
|
||||||
@ -1552,7 +1780,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "colorize",
|
"icon": "filter_colorize",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"gradient": [
|
"gradient": [
|
||||||
{
|
{
|
||||||
@ -1574,7 +1802,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "invert",
|
"icon": "filter_colorize_invert",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"gradient": [
|
"gradient": [
|
||||||
{
|
{
|
||||||
@ -1596,7 +1824,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "rainbow",
|
"icon": "filter_colorize_rainbow",
|
||||||
"name": "colorize",
|
"name": "colorize",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"gradient": {
|
"gradient": {
|
||||||
@ -1645,7 +1873,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "blend",
|
"icon": "filter_blend",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"amount": 0.5,
|
"amount": 0.5,
|
||||||
"blend_type": 0
|
"blend_type": 0
|
||||||
@ -1665,7 +1893,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "normal_map",
|
"icon": "filter_normal_map",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"amount": 0.5
|
"amount": 0.5
|
||||||
},
|
},
|
||||||
@ -1674,7 +1902,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "blur",
|
"icon": "filter_blur",
|
||||||
"name": "gaussian_blur",
|
"name": "gaussian_blur",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"param0": 9,
|
"param0": 9,
|
||||||
@ -1686,7 +1914,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "directional",
|
"icon": "filter_blur_directional",
|
||||||
"name": "directional_blur",
|
"name": "directional_blur",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"param0": 9,
|
"param0": 9,
|
||||||
@ -1698,7 +1926,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "emboss",
|
"icon": "filter_emboss",
|
||||||
"name": "emboss_2",
|
"name": "emboss_2",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"param0": 9,
|
"param0": 9,
|
||||||
@ -1723,7 +1951,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "mirror",
|
"icon": "transform_mirror",
|
||||||
"name": "mirror",
|
"name": "mirror",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"direction": 0,
|
"direction": 0,
|
||||||
@ -1734,7 +1962,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "kaleidoscope",
|
"icon": "transform_kaleidoscope",
|
||||||
"name": "kaleidoscope",
|
"name": "kaleidoscope",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"count": 5,
|
"count": 5,
|
||||||
@ -1746,7 +1974,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "warp",
|
"icon": "transform_warp",
|
||||||
"name": "warp",
|
"name": "warp",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"amount": 0.1,
|
"amount": 0.1,
|
||||||
@ -1762,7 +1990,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "buffer",
|
"icon": "miscellaneous_buffer",
|
||||||
"tree_item": "Miscellaneous/Buffer",
|
"tree_item": "Miscellaneous/Buffer",
|
||||||
"type": "buffer"
|
"type": "buffer"
|
||||||
},
|
},
|
||||||
@ -1776,7 +2004,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "switch",
|
"icon": "miscellaneous_switch",
|
||||||
"tree_item": "Miscellaneous/Switch",
|
"tree_item": "Miscellaneous/Switch",
|
||||||
"type": "switch"
|
"type": "switch"
|
||||||
},
|
},
|
||||||
@ -1803,7 +2031,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"collapsed": true,
|
"collapsed": true,
|
||||||
"icon": "debug",
|
"icon": "miscellaneous_debug",
|
||||||
"tree_item": "Miscellaneous/Debug",
|
"tree_item": "Miscellaneous/Debug",
|
||||||
"type": "debug"
|
"type": "debug"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
Before Width: | Height: | Size: 361 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 256 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 185 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 814 B |
After Width: | Height: | Size: 951 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.0 KiB |
BIN
addons/material_maker/library/base/simple_sdf_shapes_sdbox.png
Normal file
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 1.3 KiB |
BIN
addons/material_maker/library/base/simple_sdf_shapes_sdline.png
Normal file
After Width: | Height: | Size: 723 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 845 B After Width: | Height: | Size: 845 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 726 B |
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 597 B After Width: | Height: | Size: 597 B |
@ -348,7 +348,7 @@ func do_add_to_user_library(name, nodes) -> void:
|
|||||||
var result = nodes[0].generator.render(0, 64)
|
var result = nodes[0].generator.render(0, 64)
|
||||||
while result is GDScriptFunctionState:
|
while result is GDScriptFunctionState:
|
||||||
result = yield(result, "completed")
|
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()
|
result.release()
|
||||||
library.add_item(data, name, library.get_preview_texture(data))
|
library.add_item(data, name, library.get_preview_texture(data))
|
||||||
library.save_library("user://library/user.json")
|
library.save_library("user://library/user.json")
|
||||||
|