That wont handle user-knobs. The more reliable way I've found is to use nuke.nodeCopy/nuke.nodePaste, with some juggling of the selected nodes:

https://gist.github.com/dbr/5400853

On 17/04/13 07:17, Nathan Rusch wrote:
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 <mailto:[email protected]>
*Sent:* Sunday, April 14, 2013 8:50 AM
*To:* [email protected]
<mailto:[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

--
ben dickson
2D TD | [email protected]
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to