mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
Fixed a few warnings and disabled some others
This commit is contained in:
parent
8d9a086ba2
commit
49e3ca0a2d
@ -139,7 +139,7 @@ func get_targets(output_index : int) -> Array:
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
# get the list of outputs that depend on the input whose index is passed as parameter
|
# get the list of outputs that depend on the input whose index is passed as parameter
|
||||||
func follow_input(input_index : int) -> Array:
|
func follow_input(_input_index : int) -> Array:
|
||||||
var rv = []
|
var rv = []
|
||||||
for i in range(get_output_defs().size()):
|
for i in range(get_output_defs().size()):
|
||||||
rv.push_back(OutputPort.new(self, i))
|
rv.push_back(OutputPort.new(self, i))
|
||||||
@ -238,7 +238,7 @@ func serialize() -> Dictionary:
|
|||||||
rv = _serialize(rv)
|
rv = _serialize(rv)
|
||||||
return rv
|
return rv
|
||||||
|
|
||||||
func _deserialize(data : Dictionary) -> void:
|
func _deserialize(_data : Dictionary) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func deserialize(data : Dictionary) -> void:
|
func deserialize(data : Dictionary) -> void:
|
||||||
|
@ -331,5 +331,4 @@ func _deserialize(data : Dictionary) -> void:
|
|||||||
if data.has("label"):
|
if data.has("label"):
|
||||||
label = data.label
|
label = data.label
|
||||||
var nodes = data.nodes if data.has("nodes") else []
|
var nodes = data.nodes if data.has("nodes") else []
|
||||||
var connections = data.connections if data.has("connections") else []
|
mm_loader.add_to_gen_graph(self, nodes, data.connections if data.has("connections") else [])
|
||||||
mm_loader.add_to_gen_graph(self, nodes, connections)
|
|
||||||
|
@ -37,7 +37,6 @@ func get_next_widget_name() -> String:
|
|||||||
|
|
||||||
func fix() -> void:
|
func fix() -> void:
|
||||||
# Make sure all widgets have a name
|
# Make sure all widgets have a name
|
||||||
var i = 0
|
|
||||||
for w in widgets:
|
for w in widgets:
|
||||||
if !w.has("name"):
|
if !w.has("name"):
|
||||||
w.name = get_next_widget_name()
|
w.name = get_next_widget_name()
|
||||||
@ -76,7 +75,6 @@ func get_type_name() -> String:
|
|||||||
|
|
||||||
func get_parameter_defs() -> Array:
|
func get_parameter_defs() -> Array:
|
||||||
var rv = []
|
var rv = []
|
||||||
var i = 0
|
|
||||||
for w in widgets:
|
for w in widgets:
|
||||||
match w.type:
|
match w.type:
|
||||||
"config_control":
|
"config_control":
|
||||||
@ -90,7 +88,6 @@ func get_parameter_defs() -> Array:
|
|||||||
for c in configurations:
|
for c in configurations:
|
||||||
p.values.push_back({ name=c, value=c })
|
p.values.push_back({ name=c, value=c })
|
||||||
rv.append(p)
|
rv.append(p)
|
||||||
i += 1
|
|
||||||
"linked_control":
|
"linked_control":
|
||||||
var linked = w.linked_widgets[0]
|
var linked = w.linked_widgets[0]
|
||||||
var p : Dictionary
|
var p : Dictionary
|
||||||
@ -105,7 +102,6 @@ func get_parameter_defs() -> Array:
|
|||||||
p.name = w.name
|
p.name = w.name
|
||||||
p.label = w.label
|
p.label = w.label
|
||||||
rv.append(p)
|
rv.append(p)
|
||||||
i += 1
|
|
||||||
_:
|
_:
|
||||||
print("Unsupported widget of type "+str(w.type))
|
print("Unsupported widget of type "+str(w.type))
|
||||||
return rv
|
return rv
|
||||||
|
@ -78,7 +78,6 @@ func find_keyword_call(string, keyword):
|
|||||||
return null
|
return null
|
||||||
var parenthesis_level = 0
|
var parenthesis_level = 0
|
||||||
var parameter_begin = position+search_string.length()
|
var parameter_begin = position+search_string.length()
|
||||||
var parameter_end = -1
|
|
||||||
for i in range(parameter_begin, string.length()):
|
for i in range(parameter_begin, string.length()):
|
||||||
if string[i] == '(':
|
if string[i] == '(':
|
||||||
parenthesis_level += 1
|
parenthesis_level += 1
|
||||||
@ -236,10 +235,6 @@ func subst(string : String, context : MMGenContext, uv : String = "") -> Diction
|
|||||||
cont = changed and new_pass_required
|
cont = changed and new_pass_required
|
||||||
return { string=string, globals=required_globals, defs=required_defs, code=required_code, textures=required_textures }
|
return { string=string, globals=required_globals, defs=required_defs, code=required_code, textures=required_textures }
|
||||||
|
|
||||||
func create_input_function(function_name : String, input_index : int, context : MMGenContext) -> Dictionary:
|
|
||||||
var rv = { globals=[], defs="", code="", textures={} }
|
|
||||||
return rv
|
|
||||||
|
|
||||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
||||||
var genname = "o"+str(get_instance_id())
|
var genname = "o"+str(get_instance_id())
|
||||||
var rv = { globals=[], defs="", code="", textures={} }
|
var rv = { globals=[], defs="", code="", textures={} }
|
||||||
|
@ -189,8 +189,7 @@ mm_renderer="*res://addons/material_maker/engine/renderer.tscn"
|
|||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
|
|
||||||
gdscript/warnings/unsafe_property_access=true
|
gdscript/warnings/exclude_addons=false
|
||||||
gdscript/warnings/unsafe_method_access=true
|
|
||||||
gdscript/warnings/unsafe_cast=true
|
gdscript/warnings/unsafe_cast=true
|
||||||
gdscript/warnings/unsafe_call_argument=true
|
gdscript/warnings/unsafe_call_argument=true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user