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.
Locally the NFTS Envirnoment can be reached at //digitalfxserver/CompEnvironment/
on Windows Machines and mounted /Volumes/CompEnvironment
on MacOS. Paths in third party code is often implemented explicitly.
OS sensitive plugins such as 3DEqualizer and KeenTools are loaded using conditional statements and attention should be paid to run the same versions on every OS. Loading conditions are included in 3DE4/equalizer_version_check.py
, init.py
and menu.py
files.
All the definitions that I'm about to mention will act only if both the nuke script is saved and a version number is present in the file name.
The default behavior of the Incremental Save has been overwritten by the new function called incrementalSave()
. This not only increases the version of the script, but also increments every Write and DeepWrite node in the script, ensuring that the render versions always match the script versions.
To ensure that scripts are not overwritten after a render, Nuke will also ask whether to save an incremental of the script after the render has been executed. Artifacts will also be created upon render.
These extra functionalities are implemented by changing the default values of the Python Knobs adding writeBeforePipeline()
to Before Render and writeAfterPipeline()
to After Render.
When rendering form this customized version of Nuke the software automatically creates a copy of the script in the location where it's saved, adding _artifact at the end of the file name. This ensures that it's always possible to restore the script that rendered a specific output. Aritifacts are created only during GUI sessions. This is done using the nuke.GUI
variable.
incrementalSave()
has also been implemented to change the necessary python knobs on script save.
Deadline renders run in the non-GUI version of Nuke. Therefore artifacts must be created at submission time.
This is achieved with the advencedSubmission()
function. This will first run a script save nuke.scriptsave()
, followed by the standard Deadline Submission function DealineNukeClient.main()
and upon success of the last step the createArtifact()
.
This also ensures that artifacts are generated only once and not every time that a Deadline render task is initialized.
Often it is necessary to access nuke scritps form a different OS. To ensure that all the school servers and ISIS volumes are available independently from the OS file paths can be handled from the file network_drive_remapping.py
.
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()
.
User do not have permissions to modify the data on the Environment. Therefore to allow for easy publication of simple toolsets and gizmos "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
. Permissions for this folder have been modified to allow users read and write access. All data contained in here is editable, exception made for the preloaded lens distortion toolsets. These nodes are crucial for efficient lens distortion workflows and users should not attempt to remove or modify them. Only groups should be published, Gizmos are not supported.
|
|
To allow the fast setup of directories and Environment Variables, bat and bash scripts have been created.
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.
Documentation is often available. The Deadline guidelines for priorities and submission are stored in %NUKE_PATH%/documentation/deadline10_guidelines
and can also be accessed by navigating to the NFTS/Help/Deadline Guidelines
within Nuke's interface.
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.
In this repository third party scritps have been implemented, this is a list of them with links to the relative documentation.
- SharedToolsets official page
- WrapItUp official page
- Switch to NukeX official page
- Give me Python Selection for Hiero official page
- Thumbnail Exporter official page
The Environment safely stores some important scripts and executables to quickly set up other bits of software. Most of the department's machine run Windows so most of the following information (specifically Houdini's and Deadline's) is Windows-specific.
In the script %NUKE_PATH%/scripts/houdini/set_houdini_renderers.bat
, when executed, creates a houdini17.0 folder in the user's Documents and populates it with a pre-prepared houdini.env
file. This contains the necessary instructions that allow Houdini 17 to run Redshift and Arnold. Note that if the file already exists, it will be replaced.
To install the Deadline submission tool for Houdini run the Houdini-submitter-windows-installer.exe
contained in the same location. This will add extra lines to the houdini.env
so make sure to install the renderers before this.
deadline_config
folder contains INI files that store the minimization preferences for the Deadline Client GUI. The TXT files contain the necessary code to copy those files on remote machines using the deadline remote control.
The
deadline_no_gui.bat
script, permanently hides the Deadline Client form the GUI interface making it run in the background.
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.