Is there a sample code for connecting ports/nodes?
Checked the sample code in github. Correct me if I'm wrong but no examples for it.
There is no example that show specifically how to connect two ports because there is a function to do it. The function Connect must be used to connect two ports.
You can still have a look at this example where we mute a connection. To do so, we retrieve the wire, we change its attribut and reconnect the ports using this modified wire.
We will add another example where this function is used.
Gotcha. Thanks for the response.
Still having a hard time accessing the ports. Anyway for this quetion, I guess the Connect method does the job.
Also, why would a mute_selected_wire have more preference for connect_wires_between_nodes in terms of example?
It's like majority of the time spent in the node graph is creating, deleting and connecteding nodes.
There are no particular reasons. Muting a connection is less intuitive than connect two nodes. If there was a function like Connect to mute the connexion, we would not have created that example neither.