Sample Code for Connecting Ports/Nodes?
-
Hi,
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. -
Hi,
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.
Cheers,
Manuel -
Gotcha. Thanks for the response.
Still having a hard time accessing the ports. Anyway for this quetion, I guess theConnect
method does the job.Also, why would a
mute_selected_wire
have more preference forconnect_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. -
hi,
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.Cheers,
Manuel