As The Foundry's Nuke has been converted to a Python underpinning since the release of version 5.0 a great deal of interest has developed in existing and developing nuke artists for some understanding of the TD magic going on under the hood. Nuke is now an incredibly scriptable program with a very powerful set of core tools that can, in the hands of a compositor with a good basis in Python, dramatically improve the efficiency of many of the more redundant compositing tasks, and can even make the bit that remains a lot more fun in the process.
This course will spend a fair bit of time getting compositors with little or no programming / scripting knowledge up to speed; Python is very accessible to non-programmers and as you will learn a little Pythonic knowledge can go a very long way towards making your compositing life a lot easier. This course syllabus will likely change as we delve in and see how everyone does getting their feet wet. The last two lessons, especially, will evolve in response to the type of examples that you, the student body, would like to see and explore.
The most basic Python program possible, followed by an introduction to all of the basic variable types, including Integers, Floats, and Strings.
We expand on the basic numeric and string variable types presented in Class01, and continue on to the sequential variable types, lists and tuples. There is also some discussion of syntax and naming conventions.
We finish introducing the basic python variable types with a discussion of Dictionaries. We then move on to program logic flow tools such as if / elif / else conditionals and for loops, while loops, and list comprehensions.
Modules, use and abuse. Function definitions, namespaces, and variables both global and local / private. The Try statement and exception handling in general.
Jumping into Nuke: basic customization through the Init.py and Menu.py files. Folder structures and the basics of package importing. Good installation practices, followed by How to Break Nuke in One Easy Step ... and figure out how to fix it again.
Beyond customization. Simple one off scripts to make changes to many nodes very fast, quick ways of finding things you thought were lost, and the dumbest thing you'll ever see Python do to Nuke (AKA Havoc for Fun and Profit). Some time will be spent on parsing external files to bring arbitrary data into Nuke and use it for something.
The Top 10 Things you should know how to script in Nuke. Including a basic Panel GUI.
A very brief introduction to Object Oriented Programming; this is an advanced topic, but it can really come in helpful when you start looking at expanding on the toolset you've already built above. Simple Classes, an understanding of inheritance, and a foundation in the world of OOP.
The next two lessons will be dedicated to more advanced scripting examples that students request, as well as a good overview of docstrings and why they are your friend. More discussion of OOP is likely, as is a brief introduction to the Ethics of Scripting Well.
Continuation of the previous lesson.