Trees | Indices | Help |
|
---|
|
1 # Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved. 2 3 # cut the current node and then paste a copy after every other node. 4 # This was a throb invention, not sure how useful it is. 5 6 import nuke 7 import nukescripts 8 9 # Edit menu 1214 nuke.nodeCopy(cut_paste_file()) 15 nodes = nuke.allNodes(); 16 for i in nodes: 17 i.knob("selected").setValue(False) 18 nuke.nodePaste(nukescripts.cut_paste_file())1921 nodes = nuke.selectedNodes() 22 for i in nodes: 23 for j in range(i.inputs()): i.setInput(j, None)2426 """Disconnect all arrows between selected and unselected nodes, and move selected nodes to the right. 27 This function is maintained only for compatibility. Please use nuke.extractSelected() instead.""" 28 nuke.extractSelected()2931 top_node = None 32 selnodes = nuke.selectedNodes() 33 for i in selnodes: 34 totalinputs = i.inputs() 35 for j in range(totalinputs): 36 if i.input(j).knob("selected").value() is False: 37 top_node = i.input(j) 38 39 if top_node is None: return 40 41 nuke.nodeCopy(nukescripts.cut_paste_file()) 42 nuke.nodePaste(nukescripts.cut_paste_file()) 43 44 firstpastenode = None 45 46 selnodes = nuke.selectedNodes() 47 for i in selnodes: 48 firstpastenode = i 49 xpos = i.knob("xpos").value() 50 i.knob("xpos").setValue(xpos+80) 51 52 if firstpastenode is not None: 53 firstpastenode.setInput(0, top_node)54
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Nov 23 08:52:28 2012 | http://epydoc.sourceforge.net |