Often we receive plates with frame ranges that don’t begin at frame 1. The plates have 48 frame handles but we only need to deliver 8 frame handles. This script will set the selected Read node to start at frame 1 and set the correct handle ranges based on user input.
Saves a few seconds of math.
As an example, the project settings first frame for the settings in the image on the right would be 1 + 48 – 8 (41) and the last frame would 1 + [selected read node's last frame ] - [selected read node's first frame ] - 48 + 8.
Installation
- Add setProjectFrameRange.py to your ~/.nuke folder
- In ~/.nuke/menu.py, import setProjectFrameRange
- Add the command to a menu
|
1 2 3 4 5 6 |
import setProjectFrameRange menubar=nuke.menu("Nuke") m=menubar.addMenu("&Edit") #Set Project Frame Range m.addCommand("&Node/Set Project Frame Range From Node", setProjectFrameRange.callPanel, '^R') |
Configuration
You can set the project handle default frame counts (48 and 8 in the image above) in the first portion of the class.
|
10 11 12 13 14 15 16 17 |
if nuke.env["gui"]: class setProjectFrameRange ( nukescripts.PythonPanel ): def __init__( self ): #Set Project Handle Defaults handlesInHead = 48 handlesInTail = 48 handlesOutHead = 8 handlesOutTail = 8 |
Download from Nukepedia.
