mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
Added async equivalent to resolve_input_port_value
For some stuff an async version of this function was needed. This is *probably* going to be removed when we move most of the stuff to being async. But for this branch at least this allows some nodes to work.
This commit is contained in:
parent
d48a46ce11
commit
e71d367fac
1 changed files with 9 additions and 0 deletions
|
@ -319,6 +319,15 @@ func resolve_input_port_value(input_port: int) -> Variant:
|
|||
else:
|
||||
return null
|
||||
|
||||
func resolve_input_port_value_async(input_port: int) -> Variant:
|
||||
if await request_value_async(input_port) != null:
|
||||
return await request_value_async(input_port)
|
||||
elif get_input_ports()[input_port].value_callback.get_object() && get_input_ports()[input_port].value_callback.call() != null:
|
||||
return get_input_ports()[input_port].value_callback.call()
|
||||
elif get_input_ports()[input_port].value != null:
|
||||
return get_input_ports()[input_port].value
|
||||
else:
|
||||
return null
|
||||
|
||||
## Returns a [Dictionary] representation of this node.
|
||||
func to_dict(with_meta: bool = true) -> Dictionary:
|
||||
|
|
Loading…
Reference in a new issue