This Python script takes looks at the selected read node and sets the project full-size format, aspect ratio, and frame range to that of the read node. If the full-size format does not exist in the current user's list of formats, it prompts the user to name the new format before setting the project settings. Useful when first creating a script and you want to quickly set your project settings.
Set project settings from read node
Updated: 25 March 2020
Author: fuzzymango
Compatible Nuke versions: 10.0 or later
Compatibility:
Description
This Python script takes looks at the selected read node and sets the project full-size format, aspect ratio, and frame range to that of the read node. If the full-size format does not exist in the current user's list of formats, it prompts the user to name the new format before setting the project settings. Useful when first creating a script and you want to quickly set your project settings.
This code should work across all versions of Nuke, however, I've only been able to test it on Nuke 11.2v4 for Linux and Windows as that's what's available to me at the moment. Please let me know if this works well on other OS or Nuke versions.
Installation
- Download the script and place it in a folder contained in the .nuke directory that is loaded when nuke launches. (Typically a folder named 'Python', nested inside the .nuke folder, make sure this is loaded inside the init.py file)
- Copy the 2 lines of code under the 'ADD TO MENU.PY' to your menu.py (don't forget to remove the comment #s)
- When Nuke launches, there should be a new menu at the top bar called 'Utilities' with the 'setProjectSettings' code nested inside
- To run the script, selected one read node, and select 'setProjectSettings' from the dropdown menu, or use the hotkey 'meta+s'