diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 08e008ea78b..9ec0bb5dc94 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -223,6 +223,25 @@ keep_alive: bool } [/codeblock] + [b]Example:[/b] Get all connections on a specific port: + [codeblock] + func get_connection_list_from_port(node, port): + var connections = get_connection_list_from_node(node) + var result = [] + for connection in connections: + var dict = {} + if connection["from_node"] == node and connection["from_port"] == port: + dict["node"] = connection["to_node"] + dict["port"] = connection["to_port"] + dict["type"] = "left" + result.push_back(dict) + elif connection["to_node"] == node and connection["to_port"] == port: + dict["node"] = connection["from_node"] + dict["port"] = connection["from_port"] + dict["type"] = "right" + result.push_back(dict) + return result + [/codeblock]