mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
make group input node use resolve instead of raw value request when getting value and disallow group output nodes having descriptors in sidebar (#159)
closes #158 Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/159 Co-authored-by: Lera Elvoé <yagich@poto.cafe> Co-committed-by: Lera Elvoé <yagich@poto.cafe>
This commit is contained in:
parent
8156e4769f
commit
3a7facf948
2 changed files with 17 additions and 13 deletions
|
@ -95,6 +95,7 @@ func _post_deck_load() -> void:
|
|||
|
||||
func _value_request(from_port: int) -> Variant:
|
||||
if group_node:
|
||||
return await group_node.request_value_async(group_node.get_input_ports()[from_port].index_of_type)
|
||||
return await group_node.resolve_input_port_value_async(group_node.get_input_ports()[from_port].index_of_type)
|
||||
#return await group_node.request_value_async(group_node.get_input_ports()[from_port].index_of_type)
|
||||
else:
|
||||
return null
|
||||
|
|
|
@ -376,18 +376,21 @@ class GroupDescriptorsInspector:
|
|||
|
||||
_menu.add_child(Inspector.new("Usage:", usage_combo))
|
||||
|
||||
var descriptor_field := LineEdit.new()
|
||||
descriptor_field.placeholder_text = "Descriptor (advanced)"
|
||||
descriptor_field.tooltip_text = "Advanced use only.\nSeparate arguments with colon (:).\nPress Enter to confirm."
|
||||
|
||||
descriptor_field.text = port_override.descriptor
|
||||
|
||||
descriptor_field.text_submitted.connect(
|
||||
func(new_text: String) -> void:
|
||||
port_override.descriptor = new_text
|
||||
)
|
||||
|
||||
_menu.add_child(Inspector.new("Descriptor:", descriptor_field))
|
||||
if input:
|
||||
# descriptors are very rarely used on output ports. when they are,
|
||||
# the nodes are fairly special, so we're not going to allow them on groups.
|
||||
var descriptor_field := LineEdit.new()
|
||||
descriptor_field.placeholder_text = "Descriptor (advanced)"
|
||||
descriptor_field.tooltip_text = "Advanced use only.\nSeparate arguments with colon (:).\nPress Enter to confirm."
|
||||
|
||||
descriptor_field.text = port_override.descriptor
|
||||
|
||||
descriptor_field.text_submitted.connect(
|
||||
func(new_text: String) -> void:
|
||||
port_override.descriptor = new_text
|
||||
)
|
||||
|
||||
_menu.add_child(Inspector.new("Descriptor:", descriptor_field))
|
||||
|
||||
io_menu.add_child(_menu)
|
||||
|
||||
|
|
Loading…
Reference in a new issue