defaddNode(self, node): # List of nodes that should actually be added to the script nodesToAdd = []
# node might actually be a list of nodes. If it is, call onNodeAdded for each one if isinstance(node, hiero .core.nuke.Node): nodesToAdd.append( self.onNodeAdded(node) ) else: try: for n in node: nodesToAdd.append( self.onNodeAdded(n) ) except: pass
# Call base class to add the node(s) OriginalScriptWriter.addNode(self, nodesToAdd)
defonNodeAdded(self, node): """ Callback when a node is added. Return the node that should actually be added. """ if node.type() == "Read": # Change for the type of node you want to edit # Make adjustments to all nodes of that type node.setKnob("on_error", "black") # This sets each Read nodes missing frames to black node.setKnob("raw", True) # This sets disables the input color transform