import Gaffer
import Gaffer # create a new node graph graph = Gaffer.GraphComponent() # create a node and add it to the graph node = Gaffer.Node() graph.addChild(node) # create an edit scope for the node editScope = Gaffer.EditScope(node)
import Gaffer # create an edit scope for a node node = Gaffer.Node() editScope = Gaffer.EditScope(node) # add some nodes to the edit scope node1 = Gaffer.Node() node2 = Gaffer.Node() editScope.addChild(node1) editScope.addChild(node2)
import Gaffer # create an edit scope for a node node = Gaffer.Node() editScope = Gaffer.EditScope(node) # add some nodes to the edit scope node1 = Gaffer.Node() node2 = Gaffer.Node() editScope.addChild(node1) editScope.addChild(node2) # modify the inputs of nodes in the edit scope node1.setInput(0, node2['out'])This code modifies the input connections between two nodes within an existing edit scope. In summary, Python Gaffer EditScope provides a way to edit specific parts of a node graph without affecting the rest. The package library to use is Gaffer, which provides the EditScope class for creating, accessing, and modifying edit scopes.