Nuke gizmos to groups

Recursively replace all gizmos in Nuke script with a group. The only exception is the Cryptomatte nodes, which will be maintained as gizmos. Copy-paste the below code into the Nuke script editor and run. import uuid import nuke def is_gizmo(node): """Return True if given node is a gizmo (and not allowed gizmo type)""" allowed_gizmo_classes = ('Cryptomatte') for knob in node.knobs(): if 'gizmo' in knob and node.Class() not in allowed_gizmo_classes: return True def get_gizmo_names(): """Return the fullName attribute for all gizmos in script""" gizmos = [] all_nodes = nuke....

June 25, 2018 · 1 min

Distributing Python script(s) as zip file

A recent discussion on 3DPRO sparked me to scribble down some ideas on how to somewhat painlessly distribute a Python package to be run in DCC applications such as Maya or Nuke as simply as possible. So this is an alternative to building a wheel and mucking around with virtual environments. You can make Python import your modules or packages even when zipped. Example, where b is our package and c....

June 7, 2018 · 2 min

Developing with Qt.py

This post aims to give an introduction to the Qt.py project and how to get set up with it for PySide/PyQt4 and PySide2/PyQt5 development. Contents What is Qt.py How does it work? Installing Qt.py Caveats Contributing Closing comments What is Qt.py? Qt.py is a Minimal Python 2 & 3 shim around all Qt bindings - PySide, PySide2, PyQt4 and PyQt5 – which enables you to write software that dynamically chooses the most desireable bindings based on what’s available....

July 25, 2016 · 6 min

Installing Qt.py (advanced methods)

Qt.py can be installed in many ways, depending on your needs. This post aims to outline some common approaches: Install using pip Install into an application’s custom Python build Vendoring Make Qt.py available using sys.path and site.addsitedir Install using pip The probably most common way to install Qt.py (and as mentioned in the project’s README) is to install via pip: pip install Qt.py Please note that it’s not recommended to “pip install” into your operating system’s default site-packages....

July 25, 2016 · 3 min

Read node from Write node

Originally posted in 2011; A Python script for Nuke which takes any selected Write (or Read) node and creates a Read node from it. Now updated to fix some bugs and support for a wider range of scenarios. The script will actually not look for Write nodes in the selection. Instead, it’ll look for a specific knob in each of the selected nodes. If the knob is found in the node, the script will attempt to detect an image sequence or movie file based on the knob value (expressions are supported) and then create a Read node with the detected imagery....

May 23, 2016 · 3 min

A PySide/PyQt4 boilerplate for Maya, Nuke or standalone

Ever wanted to be able to run the same user interface in Maya, Nuke as well as completely standalone (with or without app-specific modifications) and on any platform, using PySide and/or PyQt? – That’s exactly why I created a boilerplate Python script, which could serve as a good starting point for most PySide/PyQt projects to be used in the VFX pipeline. As my experience is limited to some VFX applications, you are most welcome to fork or contribute to make it also run in other PyQt/PySide enabled applications....

October 6, 2013 · 1 min

Installing PyQt4 in Nuke 6.3 on Windows

A few steps to get PyQt working inside of Nuke 6.3 (Windows only for now). Please note that you need your own menu.py in place for this to work. In case you need this set up first, check out one of my previous articles, Nuke 6.3 Small studio setup for Win/Mac: 2011-10-28-nuke-63-small-studio-setup-for-windows-osx Install 64-bit Python 2.6 from here into C:\python26. Install the PyQt 4.6 snapshot from here into C:\python26_64 and make sure to untick the “Qt runtime” checkbox....

November 26, 2012 · 1 min

Metadata and EXIF in Nuke

In The Foundry’s Nuke, accessing the metadata of an image sequence’s Read node can be done via the ViewMetaData node. But if you wish to extract values out of the metadata and e.g. burn the timestamp for each frame into a render, it is actually easier to just do some python scripting. In the example below, I am using JPEG footage from a GoPro HD Hero2 but this technique also works fine for Cineon and DPX files etc....

August 18, 2012 · 2 min

Nuke and CPU usage in Windows

On Windows, sometimes Nuke and Maya fights over resources, especially the CPU. This can become apparent when background rendering with Maya. Priority By launching the Task Manager, you can right-click the Nuke6.3.exe process and choose to set its priority to “Realtime”. This will make Nuke respond without having to fight with a background Maya render. In order to launch Nuke with realtime priority already set, launch this command (or make a shortcut):...

March 28, 2012 · 2 min

Getting V-Ray to render "Nuke-style" Z-depth

Out of the box, V-Ray for Maya does not render Z-depth the same way Nuke does. Here’s a quick fix for that (not applicable for most DOF plugins). Problem When “3D-comping” something into an already 3D rendered image using a V-Ray generated Z-depth AOV to describe the depth, Nuke’s ZSlice will not work very well. The reason behind this is that Nuke internally computes Z depth from the camera plane and V-Ray computes Z depth from the camera point....

February 21, 2012 · 2 min