Skip to content

borsarinicola/NFTS_nuk_env

Repository files navigation

NFTS NUKE ENVIRONMENT

General Information

This repository contains the custom tools, pipelines and default gizmos for Nuke, Nuke Studio and Hiero that I have created for the National Film and TV School, DFX Department. It contains both original scripts that I have written and third party scripts, modified and implemented to suite the school needs. (These are marked with a * in the description's title).

This repo can be copied to a network shared drive and all machines that need access to it must have the environment variables NUKE_PATH and HIERO_PLUGIN_PATH pointing to the shared volume.

The root to the NFTS Environment is also saved in the NFTS_COMP_ENV_ROOT session environment variable, to be used withing the configurations. Please use this variable rather than hard-coding the path.

Locally the NFTS Environment can be reached at \\digitalfxserver\VFX\Shared\NFTS_nuk_env on Windows Machines and mounted /Volumes/VFX/Shared/NFTS_nuk_env on MacOS.

OS sensitive plugins such as 3DEqualizer and KeenTools are installed using helper scripts and attention should be paid to run the same versions on every OS. If a new version needs to be installed, please follow the convention set by the currently installed tools.

BEST PRACTICES

Due to the nature of the work Gizmos should be installed as groups. This allows being able to easily move nuke scripts to outside the school. This also means that any update to the available plugin will not affect old scripts, ensuring that backwards compatibility is always retained.

Custom Pipeline

Most of the custom pipeline is designed to work on fully set-up shots. Meaning it will kick in if both the nuke script is saved and a version number is present in a write node's file name.

CODE STRUCTURE

The core pipeline tools are stored the $NUKE_PATH/NFTS_pipe folder. Any code added to this root will be added to the NukePluginPath. It's divided in a few helper modules, their functionality is documented inside the relative docstrings:
  • init.py
  • menu.py
  • artifacting.py
  • callback_manager.py
  • post_processing.py
  • tools_loader.py
  • versioning.py

INCREMENTAL SAVE

Callbacks have been installed at OnScriptSave. This ensures that every Write and DeepWrite node's version number, will always match the script's, ensuring that it's always possible to re-generate the output by re-rendering script with matching version.

WRITE NODES AND ARTIFACTS

To ensure that scripts are not overwritten after a render, Nuke will also prompt the user to save an incremental of the script. Artifacts will also be created upon render. This is implemented by adding AfterRender callbacks via the callback_manager tool.

When rendering form within a fully setup shot, Nuke will automatically create a copy of the script in the location where it's saved, adding the _artifact suffix the file name. This ensures that it's always possible to restore the script that rendered a specific output.
Artifacts are not meant to be used to continue with the work. For that reason a prompt will ask if you are sure to continue when opening one. Selecting NO will close the artifact script. This is implemented by adding AfterRender callbacks via the callback_manager tool.

MAKE JPEGS FROM READ NODE

It's often useful to convert plates/assets to a JPEG sequence for for reference purposed/passing on to CG. A shortcut has been added to top menubar, under NFTS/Make JPEGs from selected Reads to automate the process.
This will auto-create JPEG sequence in the same folder as the source data of the read node, in a /jpegs subfolder. The script will attempt to assign one of the following colourspaces (if available) based on the order of preference.

  1. review (OCIO role)
  2. Output - Rec.709
  3. BT1886
  4. default (OCIO role)
Note that the main assumption is that OCIO has been configured, and it works best in an ACES configuration. In case some issue with setting up the JPEGs write node, the script will skip the automatic nodes cleanup operations and move on to the next in the selection. This tool bypasses AfterRender callbacks.

CENTRALLY INSTALLING NEW GIZMOS

Installing new gizmos should not be taken lightly. They should be thoroughly tested before pushing them centrally. To reduce the potential issue crated by editing the configuration files, the Tool Loader will scan specific folders and automatic mirror the structure of the tools in the nuke menu.
The tools expects files ending in .gizmo or .nk for gizmos, and .png for the relative icons. It will try to assign to every gizmo the icon with a matching name (if found in the same folder).
The $NUKE_PATH/NFTS_tools folder is already set-up for auto loading.

Custom Tools and Shortcuts

NFTS COPY PASTE

The NFTS Copy paste is a quick way to copy data between different scrips on different machines. It is possible to initialize the share the selected nodes by navigating to NFTS Share/Share Selected Nodes (Alt+Shift+C). Nodes are then easy to paste by selecting NFTS Share/Paste Shared Nodes (Alt+Shift+V).
The shared data is stored on a file located at $NUKE_PATH/NFTS_CopyPaste_Data.nk that gets overwritten every time that a user copies something new. This is done through the functions nftsCopy() and nftsPaste().

SHARED TOOLSETS*

It's best to touch the central configuration as little as possible. Therefore to allow for easy publication of simple toolsets and even groups, "Shared Toolsets" can be used. This allows users to select some nodes or groups from the nodegraph and publish them for everyone to use, modify and eventually delete; using the relative options in the SharedToolsets Menu. Data is stored in $NUKE_PATH/SharedToolSets.

NUKE STUDIO / HIERO TOOLS

There's a small collection of Hiero tools available. Safe for custom tokens or Export Presets they are all available in the NFTS/NFTS Hiero Tools menu.

  • Presets/Reset Environment Presets - Replaces the centrally installed presets for the current hiero version with NFTS_Safe_TaskPresets
  • Presets/Remove All User Presets - Removes the TaskPresets stored in ~/.nuke/TaskPresets
  • Presets/Reload All Local Presets - Forces a reload of user and environment presets in the current Hiero session
  • Change Clip FPS - Reinterprets the framerate of the selected clip(s) in the media bin
  • Custom {project_code} token - A three letter project code auto-generated using the hiero project name
  • Custom Tokens for {width}, {height} and {rez} - Returning respectively 1920, 1080 and 1920x1080 for a FullHD Clip

SHORTCUTS

  • KeymixV
  • Expression E
  • Invert Alt+Ctrl+I
  • Premult Alt+Shift+P
  • Unpremult Alt+Shift+U
  • ChannelMerge Shift+M
  • TransformMasked Shift+T
  • Backdrops Alt+B
  • Read from Write Shift+R
  • Reveal file in Browser Alt+Shift+R
  • Label Shortcut Shift+L
  • Cycle Operations Alt+X and Alt+Shift+X
  • Toggle nuke.executing() in the Disable Knob Alt+D

Scripts

To allow the fast setup of directories and Environment Variables, bat and bash scripts have been created.

ENVIRONMENT VARIABLES

There are two scripts available, one for Windows and one for MacOS. set_hiero_env_win.bat (WIN) creates the permanent user variable HIERO_PLUGIN_PATH and directs it to the environment while set_nuke_hiero_env_mac.command (MAC) creates temporary HIERO_PLUGIN_PATH and NUKE_PATH variables. The MAC script needs to be executed at startup to ensure a working setup or otherwise variables need to be defined in the .plist file. At the NFTS the variable NUKE_PATH should be already set by default on Windows machines.

Help and Documentation

Documentation is often available.
This GitHub page is also accessible by accessing the NFTS/Help/NFTS Environment Help menu in the Nuke menu bar. All the Nuke customizations are imported form NFTShelp.py and further instructions should be handled through that file.

Third Party Scripts and Plugins

In this repository third party scripts have been implemented, this is a list of them with links to the relative documentation.

License and Copyright

By downloading a file from this repository you agree to the general license terms below.
Copyright (c) 2010 till present. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOO/ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

NFTS Nuke Plugins and Custom Scritps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages