Nuke script: Read node from Write node11 Nov 2011 #Nuke #Python
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:
- v1.4: Better sequence detection. If you had problems with 1.3, try this.
- v1.3: Write nodes with expressions now gets evaluated correctly.
- v1.2: Takes the ‘premultiplied’ setting from the Write node, auto-detects movie files frame ranges, better logic when detecting a frame range
- v1.1: Support for filenamefilter callback
- v1.0: Initial release
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
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!