diff --git a/addons/material_maker/engine/gen_graph.gd b/addons/material_maker/engine/gen_graph.gd index ad0b7ba..c968217 100644 --- a/addons/material_maker/engine/gen_graph.gd +++ b/addons/material_maker/engine/gen_graph.gd @@ -12,8 +12,16 @@ func get_type_name(): return label func get_parameter_defs(): + var params = get_node("gen_parameters") + if params != null: + return params.get_parameter_defs() return [] +func set_parameter(p, v): + var params = get_node("gen_parameters") + if params != null: + return params.set_parameter(p, v) + func get_input_defs(): var inputs = get_node("gen_inputs") if inputs != null: @@ -98,10 +106,8 @@ func disconnect_children(from, from_port : int, to, to_port : int): return true func _get_shader_code(uv : String, output_index : int, context : MMGenContext): - print("Getting shader code from graph") var outputs = get_node("gen_outputs") if outputs != null: - print("found!") var rv = outputs._get_shader_code(uv, output_index, context) while rv is GDScriptFunctionState: rv = yield(rv, "completed") diff --git a/addons/material_maker/engine/gen_remote.gd b/addons/material_maker/engine/gen_remote.gd index 92e5fc7..1828cdc 100644 --- a/addons/material_maker/engine/gen_remote.gd +++ b/addons/material_maker/engine/gen_remote.gd @@ -76,6 +76,8 @@ func set_parameter(p, v): print("error: incorrect config control parameter value") return .set_parameter(p, v) + if name == "gen_parameters": + get_parent().parameters[p] = v func _serialize(data): data.type = "remote" diff --git a/addons/material_maker/engine/loader.gd b/addons/material_maker/engine/loader.gd index bcd576f..b428687 100644 --- a/addons/material_maker/engine/loader.gd +++ b/addons/material_maker/engine/loader.gd @@ -62,7 +62,7 @@ static func create_gen(data) -> MMGenBase: elif data.type == "ios": generator = MMGenIOs.new() if data.has("mask"): - generator.mask = data.mask + generator.mask = int(data.mask) generator.ports = data.ports elif data.type == "switch": generator = MMGenSwitch.new() diff --git a/addons/material_maker/icons/icons.svg b/addons/material_maker/icons/icons.svg index 61805a8..2a31081 100644 --- a/addons/material_maker/icons/icons.svg +++ b/addons/material_maker/icons/icons.svg @@ -10,9 +10,9 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="210mm" - height="297mm" - viewBox="0 0 210 297" + width="64" + height="64" + viewBox="0 0 64 64" version="1.1" id="svg8" inkscape:version="0.92.3 (2405546, 2018-03-11)" @@ -48,20 +48,27 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.1274425" - inkscape:cx="116.41955" - inkscape:cy="914.64295" - inkscape:document-units="mm" + inkscape:zoom="14.304427" + inkscape:cx="46.907045" + inkscape:cy="41.347265" + inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" inkscape:window-height="1017" inkscape:window-x="-8" inkscape:window-y="-8" - inkscape:window-maximized="1"> + inkscape:window-maximized="1" + inkscape:pagecheckerboard="true" + units="px" + scale-x="2.1" + inkscape:snap-to-guides="false" + inkscape:snap-grids="false"> + id="grid815" + spacingx="4.2333332" + spacingy="4.2333332" /> @@ -71,25 +78,18 @@ image/svg+xml - + - + id="layer1" + transform="translate(0,-280.06665)"> @@ -109,7 +109,7 @@ inkscape:export-xdpi="16.531826" inkscape:export-filename="remove.png" id="g4564" - transform="matrix(0.82426401,0.81188676,-0.82426401,0.81188676,84.358228,-6.2929802)" + transform="matrix(0.43370177,0.42718925,-0.43370177,0.42718925,43.791013,273.09803)" style="fill:#ff0909;fill-opacity:1"> + transform="matrix(0.53954693,0,0,0.52735129,-2.0235322,258.7025)"> @@ -185,17 +185,20 @@ id="g879" inkscape:export-filename="save.png" inkscape:export-xdpi="14" - inkscape:export-ydpi="14"> + inkscape:export-ydpi="14" + transform="matrix(0.52616852,0,0,0.52616852,14.395212,275.18126)"> + d="m 130,152.51953 v 110 h 110 v -99.28906 l -10.71094,-10.71094 z" + style="opacity:1;fill:#14008d;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" + inkscape:connector-curvature="0" /> + d="m 155,152.51953 v 40 h 60 v -40 z m 40,10 h 10 v 20 h -10 z" + style="opacity:1;fill:#afafaf;fill-opacity:1;stroke:none;stroke-width:4.04048538;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" + inkscape:connector-curvature="0" /> - - + inkscape:connector-curvature="0" /> + inkscape:export-ydpi="13.499794" + transform="matrix(0.51223521,0,0,0.51223521,5.2214853,275.80647)"> + d="m 330,152.51953 v 110 h 90 v -92.57422 l -17.42773,-17.42578 z" + style="opacity:1;fill:#ffed46;fill-opacity:1;stroke:#c7b115;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" + inkscape:connector-curvature="0" /> + d="m 403,152.94727 v 16.57226 h 16.57422 z" + style="opacity:1;fill:#ffed46;fill-opacity:1;stroke:#c7b115;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" + inkscape:connector-curvature="0" />