SetFrameAs.py is a Nuke Python script that provides a user-friendly modal dialog to set the "start at" frame for selected Read Nodes. Accessible via Custom Menu, it allows users to input a custom frame number, defaulting to the project's first frame. The script checks for valid Read nodes and their required knobs (frame_mode and frame), applying the specified frame value if the user confirms via the "OK" button.
Error messages are displayed for invalid selections or missing knobs.
This tool streamlines frame adjustments for Read nodes, enhancing workflow efficiency in Nuke's GUI environment.
Set Frame As
First submitted: 24 August 2025
Author: MinnazRehman
Compatible Nuke versions: 7.0 or later
Compatibility: Source
Installing SetFrameAs.py in Nuke
This guide explains how to install the SetFrameAs.py script in your Nuke setup and add it to a custom menu bar in the .nuke folder.
Installation Steps
Locate or Create the
.nukeFolderThe
.nukefolder is Nuke's user configuration directory, typically located in your home directory:Windows:
C:\Users\<YourUsername>\.nukeMacOS:
/Users/<YourUsername>/.nukeLinux:
/home/<YourUsername>/.nuke
Place the Script in the
.nukeFolderCopy the
SetFrameAs.pyscript.Place
SetFrameAs.pydirectly in the.nukefolder.Ensure the file name is exactly
SetFrameAs.py.
Create or Edit
menu.pyIn the
.nukefolder, locate or create a file namedmenu.py.Open
menu.pyin a text editor.
Add the Custom Menu Bar Entry
Add the following code to
menu.pyto create a "Custom Tools" menu and add theSetFrameAscommand:import nuke # Create or access the Custom Tools menu Custom_Tools = nuke.menu('Nuke').addMenu('Custom Tools') # Add Set Frame As command, referencing the function in SetFrameAs.py Custom_Tools.addCommand('Set Frame As', 'set_frame_as.set_frame_as()')Note: The command assumes
SetFrameAs.pydefines theset_frame_asfunction. Theset_frame_as.set_frame_as()syntax works because Nuke automatically loads Python scripts from the.nukefolder, making the module and function available.
Save and Test in Nuke
Save the
menu.pyfile.Launch Nuke or restart it if already open.
In Nuke's menu bar, navigate to Custom Tools > Set Frame As.
Select one or more Read nodes, then select the menu item to open a dialog where you can set the start frame.
Notes
Ensure
SetFrameAs.pyis in the.nukefolder, as Nuke automatically loads Python scripts from this directory.If the menu item doesn't appear, verify the
menu.pysyntax and ensureSetFrameAs.pyis correctly named and placed.The script's pop-up dialog box will automatically load the first frame from project settings and you can change that to custom frame number.