Created
January 18, 2018 12:35
-
-
Save greenvfx/2272c28d677366b317fd159c3cd2a3dd to your computer and use it in GitHub Desktop.
Duplication of selectrd nodes with inputs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def duplicate_selected_node_with_inputs(): | |
sn = nuke.selectedNode() | |
nuke.nodeCopy(nukescripts.edit.cut_paste_file()) | |
nodes = nuke.allNodes(); | |
for i in nodes: | |
i.knob("selected").setValue(False) | |
dupNode = nuke.nodePaste(nukescripts.edit.cut_paste_file()) | |
for i in xrange(sn.inputs()): | |
dupNode.setInput(i, sn.input(i) ) | |
return | |
duplicate_selected_node_with_inputs() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment