Assuming `node` is the node you want to duplicate:
for n in nuke.allNodes():
n.setSelected(False)
newNode = nuke.createNode(node.Class(),
node.writeKnobs(nuke.WRITE_NON_DEFAULT_ONLY | nuke.TO_SCRIPT), inpanel=False)
-Nathan
From: sanfx
Sent: Sunday, April 14, 2013 8:50 AM
To: [email protected]
Subject: [Nuke-python] duplicating a nuke node
can anyone tell me how should I duplicate a nuke node without using Code:
nukescripts.node_copypaste()
if I use the above technique it copies node information to clipboard which is
what i dont want, I want to duplicate a reformat node and connect the
duplicated one to copy node's B input....
--------------------------------------------------------------------------------
san
--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python