Fixed sdf3d -> sdf3dc conversion

This commit is contained in:
RodZill4 2020-02-05 06:36:49 +01:00
parent 6b183aa7a0
commit c59496a3a8
2 changed files with 7 additions and 5 deletions

View File

@ -55,7 +55,7 @@
"params":"p",
"slot_type":2,
"convert":[
{ "type":"sdf3dc", "expr":"vec2($(value)).rgb, 0.0)" }
{ "type":"sdf3dc", "expr":"vec2($(value), 0.0)" }
],
"color":{ "r":0.5, "g":0.0, "b":0.0, "a":1.0 }
},

View File

@ -177,6 +177,7 @@ func update_node() -> void:
var type_left = 0
if typeof(input) == TYPE_DICTIONARY:
enable_left = true
if mm_io_types.types.has(input.type):
color_left = mm_io_types.types[input.type].color
type_left = mm_io_types.types[input.type].slot_type
set_slot(i, enable_left, type_left, color_left, false, 0, Color())
@ -251,6 +252,7 @@ func update_node() -> void:
assert(typeof(output) == TYPE_DICTIONARY)
assert(output.has("type"))
enable_right = true
if mm_io_types.types.has(output.type):
color_right = mm_io_types.types[output.type].color
type_right = mm_io_types.types[output.type].slot_type
set_slot(i, is_slot_enabled_left(i), get_slot_type_left(i), get_slot_color_left(i), enable_right, type_right, color_right)