Nuke Studio Comp Cleaner v1.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Fynn Laue
Website: fynnlaue.com
Cleans up generated .nk files by Nuke Studio: Set project Format to a plate's format, remove unnecessary nodes, add python snippet to write node to validate write filepath.
Requirements:
10.0, 9.0 or later
Mac
30 Jul 2016
87

Nuke Studio Comp Cleaner
by Fynn Laue 2016
Thanks to Mads Hagbarth L. for code snippedts and sparring.

 

DESCRIPTION:
tl;dr: Cleans up .nk files generated by Nuke Studio.
The script 'cleans up' scripts that Nuke Studio generates: Making sure the project Format is correct, removing some unnecessary nodes and adding a python snippet that creates the output folder if it doesn't exist.
The idea is, that you generate 'special comps' in NukeStudio and immideately after run this script, so the comps are ready to be worked on, instead of manually having to fix every .nk file before it is ready.


INSTALLATION:
- Copy the contents of 'NukeStudioCompCleaner' to your ~/.nuke folder. You don't need to copy the LICENSE and README files.
- Add the following code to the menu.py file (can also be found in nkstCC_resources/menu.py) :

  1. import nkstCC_init
  2. if nuke.env['studio']: nuke.menu('Nuke').addMenu('nkstCC').addCommand('Clean Comps',nkstCC_init.main)
  3. else: nuke.menu('Nuke').addMenu('nkstCC').addCommand('Clean Comp',nkstCC_init.main)

- Restart Nuke


HOW TO USE:
DO NOT RUN THE SCRIPT ON COMPS THAT HAVE BEEN WORKED ON !!!
ONLY RUN IT ON NEWLY CREATED .NK SCRIPTS BY NUKE STUDIO !

Nuke Studio:
- Select a bunch of 'comp clips' in the timeline. (Items that are linked to .nk files)
- If you don't have any 'comp clips' in your timeline, read this article: http://help.thefoundry.co.uk/nuke/content/timeline_environment/exporting/building_vfx_tracks.html
- Run the script from the menu nkstCC > Clean Comps
- In the dropdown menu select the track that holds the footage you want to use as the root format in each .nk Script.
- Enable/Disable other options
- Click OK
- The script will process all selected items and display a message when it's done.

Nuke:
- Run the script from the menu nkstCC > Clean Comps
- In the dropdown menu select the read node with the format you want to use as the root format.
- Enable/Disable other options
- Click OK
- The script will process the currently open .nk file and display a message when it's done.


DETAILED BREAKDOWN OF FUNCTIONALITY:
Deletes nodes:
- Reformat
- AppendClip
- Copy
- Constants
Because:
It's more annoying than useful to not be able to see the complete source material.

Set Project Format:
Reads the format of the selected 'Main Plate' and uses it as the root's format.
In NukeStudio you'd select a track, in Nuke you'd select a Node.
Because:
Nuke Studio uses the timeline's or the selected clip's format as the root, and reformats all input-read nodes, when generating comps.
That is especially annoying when You've got different formats for each plate or if a plate gets formatted to a smaller format.

Auto Write Node:
It adds a small python snippet to the 'before render' field in every write node in the script.
The snippet checks if the selected folder in the write nodes 'file' field exists and creates it if not.
This is not really necessary, but I found it to be a nice addition, so when You increment the write node, You don't have to create version folders manually every time.

VersionUp:
I highly recommend leaving this checked. It's always nice to be able to go back.
It simply saves the modified scripts as a new version instead of overwriting.

 

Updates:

v1.1 : Updated version checking, making it safer and compatible with older versions of Nuke Studio (tested in v 9.0v1). 

 

GitHubhttps://github.com/fynnay/NukeStudioCompCleaner

Please login in order to download these files.

You have no rights to post comments

We have 3212 guests and 63 members online