Python for NUKE and Gizmology

Taught by Victor Perez

Course Number:
Software Version:
Original Run Date:
July 2014 
8 hours 9 minutes 
Python is a programming language whose design philosophy emphasizes code readability allowing you to work faster and to integrate Nuke operations more effectively. A must-know subject for hight level Nuke artists, such as compositors, digital matte painters, technical directors, roto and prep artists. You can learn to use Python and see almost immediate improvements in productivity.

Professor Victor Perez, voted #2 most valuable contributor in 2012 and Official Nuke Certified Trainer, has designed this course to provide you with the knowledge to read, manipulate or write your Python scripts, execute your own operations in the Nuke environment, manipulate and customize the Nuke GUI, and the most important, give you the keys to allow you to improve your Python skills by your own research and development.

On the practical side of the course, Python is applied to the creation of Nuke gizmos and nodes to develop your own tools. A complete guide to Gizmology: projecting, developing, building and distributing your own gizmos with the whole Nuke community.

Victor Perez is a senior visual effects artist with over 12 years of production experience in computer graphics, digital grading and visual effects, as well as a NUKE Official Certified Trainer by The Foundry. As a senior digital compositing artist and 2D Technical Director he has a fine combination of both artistic and technical understanding of film post-production and visual effects. Member of Visual Effects Society and usual collaborator of Nukepedia. Victor has worked and researched with Oscar winner studios such as Cinesite and Double Negative and others. His personal web site is
Python for NUKE and Gizmology
Watch our overview of the course

Class Listing

Class 1

Introduction: What is Python and what can I do with it in Nuke? Useful bibliography and reference web sites: How to search for the information when I need it. Nuke's Script Editor vs 3rd party script editors (for Mac OS X, Windows and Linux). More than just Python: Nuke expressions, how they work and when it's better to use then rather than a Python script. Units of Information in Python: Types. What is a Variable? How to create and modify Variables.

Class 2

Handling Python Types: Transforming numeric units into strings and the other way around; Modifying lists by adding, removing or picking elements. Compound statements I: 'if', 'while'.

Class 3

Compound statements II: 'for' and try'. Defining, storing and executing functions within Nuke. Introduction to the 'nuke' module: node selection methods. Accessing nodes and their knobs.

Class 4

Getting and setting values on target knobs. Node Classes demystified. Creating and deleting nodes and groups of nodes from Python commands. Accessing grouped nodes (nested structures). Customizing nodes on creation. Making connections between nodes. Setting expressions on target knobs.

Class 5

Customizing Nuke GUI: the '.nuke' folder, creating a folder structure, the '' and '' Python scripts, add Nuke menu items and toolbar items (to call gizmos), default values for node classes.

Class 6

Other useful modules in Python: how to create folders in the OS from Nuke. Creating blank nodes and populating them with knobs from Python.

Class 7

Callbacks: the 'knobChange' utility and common applications. Disabling and enabling knobs based on user actions. Frame related functions.

Class 8

Designing a gizmo: What's the purpose of my gizmo? Planning and laying out its controls, building the node structure and linking its nodes to its knobs. The 'V_EdgeMatte' case study. You can find this gizmo published on Nukepedia:

Class 9

Creating Nuke custom panels, dialogs and messages. Rendering customization scripts. Aesthetic considerations to build user friendly gizmos, common standard organisation. Cross-platform solutions for OS-dependent actions.

Class 10

Node Graph position knob utilities. Input-format depending expressions. Naming conventions. Nuke icons guidelines. Publishing recommendations.