Nuke script: Read node from Write node

Howdy! There's a newer version of this script here.

Written in Python, with Nuke 6.9 in mind, generate a Read node from the selected Write node.

The script will attempt to load an image sequence or a single file (such as a movie file), based off the selected Write node. If the first and last frame can not be determined, it will fall back to the project settings’ frame range and throw a warning.

The script comes with one limitation; it assumes you render out any file sequences with a frame padding of four digits surrounded by period signs:

Supported real world examples:

Download: readFromWrite.py

Place the Python script in the /scripts dir inside your NUKE_PATH (see my previous post on setting this up). Add the following to your menu.py:

import readFromWrite
nuke.menu( 'Nuke' ).addCommand( 'My file menu/Read from Write', 'readFromWrite.readFromWrite()', 'shift+r' )

You should now be able to select any Write node and hit Shift + R to generate a Read node!