material-maker/addons/material_maker/widgets/node_editor/output.gd
RodZill4 0d85cd5aef Updated custom node and associated editor
Custom nodes now support outputs and basic (float) parameters, and are serialized/deserialized correctly.
2018-10-09 07:24:44 +02:00

23 lines
371 B
GDScript

tool
extends HBoxContainer
func _ready():
pass
func set_model_data(data):
if data.has("rgb"):
$Type.selected = 1
$Default.text = data.rgb
elif data.has("f"):
$Type.selected = 0
$Default.text = data.f
func get_model_data():
if $Type.selected == 1:
return { rgb=$Default.text }
else:
return { f=$Default.text }
func _on_Delete_pressed():
queue_free()