Automates creation of write nodes.
Make Write from Read
Updated: 2 August 2010
Author: hakan.blomdahl
Compatible Nuke versions: 6.0 or later
Compatibility: Linux, Mac, Windows
Changes in version1.2
Proper handling of paths. Was hardcoded to work on windows. Now platform independent.
This method will assist automated creation of Write-nodes, using the filename of upstream Read-nodes.
Typical scenario:
1. Drop in a bunch of still images.
2. Foreach image add some, for example, Grade-nodes and fix a good look.
3. Now select all grade-nodes and run this script.
4. The script will look for an upstream Read-node and use that filename for creation of write nodes. The panel that presents itself will allow you to modify that filename or path.
Usage:
import makewritefromread
# Add extra Tools menu
mymenubar=nuke.menu("Nuke")
m=mymenubar.addMenu("Tools")
# Create Tools menu for right click menu:
nodetoolbar = nuke.menu("Nodes")
t=nodetoolbar.addMenu("Tools")
m.addCommand("Make Write from Read...", 'makewritefromread.make_write_from_read()', '')
t.addCommand("Make Write from Read...", 'makewritefromread.make_write_from_read()', '')