Important Notice:

On July 31st, 2017 the Digital-Tutors library will be retired along with Digital-Tutors concurrent licensing. Effective August 1, 2017 any active group plans will be redirected to www.pluralsight.com. Each group plan will receive one individual user license on Pluralsight for each active Digital-Tutors license. Please contact your account representative for any additional questions.
Introduction to Python Scripting in NUKE
See Details
Released Oct 1, 2012
Chris Glick

Pluralsight

Chris Glick
Python is a widely used scripting language that is integrated into NUKE to let us artists control the user interface, quickly modify many nodes and integrate with external applications. By learning some Python commands and workflows we can extend NUKE and write scripts that let us focus on creating art. We will start this NUKE tutorial by echoing the Python commands that NUKE uses internally and begin writing our own code. From there we will learn how to correctly create nodes, set properties at node creation and have our scripts automatically run whenever NUKE starts up. From there, we can begin working on some projects, like a script that selects all nodes of a specific class based on user input and a script to automatically break a multi-channel EXR into individual auto-cropped shuffle nodes so we can begin compositing faster.
Introduction and Project Overview
1

Introduction and Project Overview

 
01:21
Accessing our Script Editor and writing a Python script
2

Accessing our Script Editor and writing a Python script

 
03:38
Running and finding help on Python commands
3

Running and finding help on Python commands

 
08:52
Creating new nodes and setting knob values
4

Creating new nodes and setting knob values

 
08:33
Using variables to store information and nodes for later edits
5

Using variables to store information and nodes for later edits

 
08:25
Printing numbers with strings in Python
6

Printing numbers with strings in Python

 
07:22
Setting node and knob defaults and saving them in menu.py
7

Setting node and knob defaults and saving them in menu.py

 
07:53
General coding workflows to save time and headache
8

General coding workflows to save time and headache

 
04:13
Getting selected nodes to modify in Python
9

Getting selected nodes to modify in Python

 
06:47
Using and working with Lists to store multiple nodes
10

Using and working with Lists to store multiple nodes

 
07:19
Modifying each item in a list with a For In loop
11

Modifying each item in a list with a For In loop

 
10:16
Controlling script flow using if statements
12

Controlling script flow using if statements

 
13:05
Doing common operations using the included Python scripts
13

Doing common operations using the included Python scripts

 
05:24
Getting input from the user to customize our commands
14

Getting input from the user to customize our commands

 
05:44
Selecting all nodes of a certain type by checking their Class
15

Selecting all nodes of a certain type by checking their Class

 
06:56
Creating a quick message to our user with the results
16

Creating a quick message to our user with the results

 
05:13
Working with layers and channels in Python
17

Working with layers and channels in Python

 
08:13
Using string splits and sets to gather unique channel layer names
18

Using string splits and sets to gather unique channel layer names

 
08:51
Connecting node inputs to shuffle our channels out
19

Connecting node inputs to shuffle our channels out

 
10:31
Executing commands and copying animation in Python
20

Executing commands and copying animation in Python

 
12:55
Packaging pieces of code in functions for reuse and simplicity
21

Packaging pieces of code in functions for reuse and simplicity

 
10:56
Adding commands to the NUKE user interface for later use
22

Adding commands to the NUKE user interface for later use

 
10:24