
See Animating Parameters for more information. Tip:Using FrameRange, you can also set the frame range for a clip directly in the Dope Sheet. To make an edit, you can first use this node to cut portions out of input sequences and then append the results together using the AppendClip node. Press S on the Node Graph to open the Project Settings, and enter frame range values that match the output range you specified. This controls which frames are sent to the flipbook and displayed in the Viewer when the frame range source dropdown menu is set to Input.Īfter setting the frame range for a clip, you may want to adjust the script length for the new output range. # LIST ALL KNOBS FOR SELECTED NODEprint( nuke.toNode('Read1') )# LIST ALL KNOBS FOR SPECIFIC NODEprint( lectedNode() )# GET VALUE FROM SPECIFIC NODE, METHOD 01value = nuke.toNode('Read1').knob('file').getValue()#PRINT VALUE FROM SPECIFIC NODE, METHOD 02node = nuke.toNode("Blur1")print node.value()# GET VALUE FROM SELECTED NODEvalue = lectedNode().knob('file').getValue()#GET DEFAULT VALUEnuke.toNode('Blur6').knob('size').Lets you set a frame range for a clip. Knob = nuke.toNode("NameGroup.NameNodeDestination").knob("filter") #CONNECT Pulldown Choice (for example Filter) inside a Group Knob = nuke.toNode("NameGroup.NameNode").knob("KnobNode") #CONNECT knob inside a Group with a knob in the Group #DISCONNECT lectedNode().setInput(1, None)#DISCONNECT ALL THE INPUTS OF THE SELECTED NODEfor i in range(0, lectedNode().maxInputs()): lectedNode().setInput(i, None)#-#DEPENDENT AND DEPENDENCIES#LIST OF NODES DEPENDENT AND lectedNode().dependent()lectedNode().dependencies()#PRINT THE NAME OF THE NODESfor i in lectedNode().dependencies(): print i.name()

#CONNECT THE OUTPUT OF THE SELECT NODE TO THE INPUT 0 OF COLORCORRECTnuke.toNode('ColorCorrect3').setInput( 0, lectedNode() )#CONNECT THE OUTPUT OF THE SELECT NODE TO THE INPUT 1 (MASK) OF COLORCORRECTnuke.toNode('ColorCorrect3').setInput( 1, lectedNode() )#CONNECT OUTPUT OF COLORCORRECTION TO ALL THE SELECTED NODESfor i in lectedNodes(): i.setInput( 0, nuke.toNode('ColorCorrect3'))#-#CREATE A MERGE NODE E CONNECT THE INPUTS TO THE SELECTED NODESa = nuke.createNode('Merge')b = lectedNodes()x=0for i in b: if x=2: x+=1 continue a.setInput(x,i) x+=1#. ssage("SELECT A NODE.\nIf you want to change color of Nodes inside a Group, please select also the Group in the Node Graph.") ssage("Changing color of Nodes inside Group: " + nodeSelected.name()) #if node selected is a group, then check if anything is selected inside If (nodeSelected.Class() = "Group" and lectedNodes()): THIS IS THE WAY I USED IN MY ColorPanel code: #print the list print array #-#DESELECT ALL SELECTED NODESif lectedNodes(): for i in lectedNodes(): i.setValue(False) #Add the value to the list array.append(n) SELECT NODES AND CREATE A LIST OF ALL THE NAMESarray = #create the arrayfor node in lectedNodes(): n = node.value() print nodes.getValue() #-#ADD NAME OF NODES INTO A ARRAY (LIST). # The list of nodes.sn = lectedNodes() for node in sn: #Select all the Blur nodes if node.Class() = "Blur": tValue(True)#-#RUN A SCRIPT FOR EVERY SELECTED NODE #Instead of 'ColorCor' put the name that you want if node.value().startswith("ColorCor"): tValue(True)#-#SELECT NODE BY CLASSfor node in nuke.allNodes(): #Attribute 'selected' becomes True tValue(True) #-#SELECT NODES THAT START WITH A SPECIFIC "STRING"for node in nuke.allNodes():

#The 'for loop'for node in nuke.allNodes(): #GET SELECTED lectedNode()#GET MULTIPLE NODES lectedNodes()#SELECT NODE BY NAMEnode = nuke.toNode("Blur1")node.knob('selected').setValue(True)#SELECT ALL THE NODES #String map (replace multiple stringpairs) (this returns: xxffffxxyy): #Replace string in current node file knob with regex (string “proj” to “projects” in all occurences): #Setting a variable, without returning that (useful in a textnode): #Setting a knob’s value of a specific node: #Get the value of the channel of a node, at a specific pixelcoordinates (e.g.: 10,10): #Return sample pixel value of the node Add1 reading in the red at position of knob Center: #Get the x position of the point #3 of the Bezier1 of the Roto1 node: #Get the format from the input of the node: #Get the bounding Box from the input of the node: #Return 1 if the node is on error otherwise 0: #Name of the node before the group (Outside): #GETTING A KNOB’S VALUE OF A SPECIFIC NODE: (' big!' if nuke.thisNode().value()>100 else ' small')

Print "Updated String : ", var1 + 'Python'Įlif var 100 then print 'big', otherwise print 'small'
