import Gaffer graph = Gaffer.Graph() node1 = Gaffer.Node() node2 = Gaffer.Node() # create a connection between node1 and node2 connection = Gaffer.Connection(node1['out'], node2['in']) # disable the connection connection.setEnabled(False)
import Gaffer graph = Gaffer.Graph() node1 = Gaffer.Node() node2 = Gaffer.Node() # create a connection between node1 and node2 connection = Gaffer.Connection(node1['out'], node2['in']) # block the connection graph.blockedConnections().add(connection)In the above examples, the Gaffer package library is being used to create a graph, nodes, and connections between nodes. The BlockedConnection module is used to enable/disable and block/unblock connections between nodes in the graph.