top of page
Writer's pictureMarcel Pichert

Duplicate with inputs

Updated: Dec 25, 2019

This script duplicates the selected nodes and keeps all their inputs to nodes that are not in the selection.


You cut either duplicate the nodes directly or copy them first and then paste them later in another place of the script.


It is very handy when using the same node setup multiple times in the same comp.

If you have for example a 3d setup that uses one shot cam and one matchmove geometry that is in another place in your comp, you could duplicate the setup without the need to reconnect the camera and geometry.


Get it on nukepedia:

http://www.nukepedia.com/python/nodegraph/duplicate-with-inputs


Copy script from Pastebin:

https://pastebin.com/cT5mRnXh


 

Installation:


Place the 'duplicateWithInputs.py' in your .nuke folder or any other user-defined plugin path.


Add this to your menu.py:


import duplicateWithInputs


nuke.menu('Nuke').addCommand('Scripts/Duplicate with Inputs/copy','duplicateWithInputs.copyWithInputs()', 'ctrl+alt+c') nuke.menu('Nuke').addCommand('Scripts/Duplicate with Inputs/paste','duplicateWithInputs.pasteWithInputs()', 'ctrl+alt+v') nuke.menu('Nuke').addCommand('Scripts/Duplicate with Inputs/duplicate','duplicateWithInputs.duplicateWithInputs()', 'ctrl+alt+x')


 

Versions:


V1.3:

- added copy and paste functionality


V1.2:

- all nodes are now selected after the duplication


V1.1:

- fixed an error caused by a non ASCII character


 

Tested with Nuke 10 and newer versions, but it could also work in older ones.


Feel free to comment for any questions and suggestions.


Cheers Marcel

409 views0 comments

Comments


bottom of page