duplicate with inputs

Duplicate multiple nodes and keep their inputs.

Updated: 18 September 2018

Author: comp_V01

Compatible Nuke versions: 10.0 or later

Compatibility: Linux, Mac, Windows

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.

 


 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')


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

Sign in or register to download or rate.