Title Image

Python in Production

6 hours 47 minutes
Chris Zurbrigg

Become a Patron!


Python is an integral part of the Production Pipeline. It is the glue that connects the different departments, DCC applications and other software together. From standalone tools to end-to-end automation, Python has become the primary programming language of animation and VFX studios.

This is an ongoing series covering many of the concepts, tools and use cases that make Python so valuable to Pipeline TDs.
* This is a Patreon series. Project files and videos marked with a Patreon logo are Total Access exclusives.

Course Outline

35 Videos (6 hours 47 minutes)

00 - Introduction

A high level overview of what is upcoming in the Python in Production series.

01 - VFX Reference Platform

An introduction to the VFX Reference Platform and the benefits of using it to establish a common target platform for building software in the animation and VFX industries.

02 - Installing Python 3

All of the examples in this series are written for Python 3 and this video provides a short guide outlining the installation of Python 3 on Windows and macOS.

03 - Development Environment

An Integrated Development Environment (IDE) is an essential tool for software development. Offering numerous time-saving and productivity features, an IDE should provide the foundation for every TD's development environment.

04 - Package Management

This lesson provides an overview of package management it Python and how it can be used to extend the functionality of Python with 3rd party libraries downloaded from the Python Package Index.

05 - Virtual Environments

Learn how to create different test environments and avoid package conflicts, caused by application dependencies, using Python virtual environments.

06 - Keep It Simple

For viewers who are new to standalone Python development, this is a reminder to not get hung up on trying creating the "perfect" envrionment. Find the tools that work best for you and focus on writing great software.

07 - Qt For Python

A brief look at the Qt for Python project and installing the PySide2 package into your Python environment.

08 - Standalone Qt Application

With PySide2 installed, it's time to create a standalone Qt application.

09 - JSON Overview

An introduction to JSON -- what it is and how it can be used in the Production Pipeline.

10 - JSON in Python

A hands on look at how to work with JSON files and strings using Python's built-in json module.

11 - A Practical JSON Example (Part 1)

Using a simple Asset Viewer application as an example, learn how to load, manage, update and save asset data with Python and JSON.

12 - A Practical JSON Example (Part 2)

Completing the Asset Viewer example, this lesson adds the logic to update the asset data internally and write any changes to disk.

13 - Qt Dark Mode

In this lesson, learn a simple and straightforward method for switching a Qt application's default style and color palette to a modern dark theme.

14 - Automation with Sockets (Part 1)

In a modern pipeline there are often multiple DCC applications, a render manager, an asset management system and a wide collection of in-house tools. In order to facilitate automation, communication between applications is an absolute requirement.

15 - Automation with Sockets (Part 2)

In this lesson, a standalone client is implemented that connects to Maya's command port and constructs a basic scene using Maya commands.

16 - Automation with Sockets (Part 3)

Continuing on from the previous lesson, a simple standalone server is implemented capable of establishing connections, processing commands received from clients and sending replies.

17 - Automation with Sockets (Part 4)

Building on the Maya client example, a reusable Maya Client API is created to abstract away the complexities of connecting to, and communicating with, Maya.

18 - Automation with Sockets (Part 5)

Over the next few lessons a robust and reusable client/server solution will be implemented, leveraging both JSON and Qt (server-side), to help facilitate automation in the production pipeline. Additionally, an example will be provided illustrating how this solution can be extended to replace the commandPort in Maya.

19 - Automation with Sockets (Part 6)

Continuing on from the previous video, this lesson adds the logic to encode, send, receive and decode JSON messages of varying lengths.

20 - Automation with Sockets (Part 7)

In this lesson, a custom Python Client API is implemented by extending the client and server base classes from the previous example.

21 - Automation with Sockets (Part 8)

In addition to standalone Qt Applications, the BaseServer class can be extended and used to create a custom client API for Maya that completely replaces Maya's command port.

22 - Multithreading (Part 1)

An introduction to multithreading and multithreading in Python using Qt's QThread class.

23 - Multithreading (Part 2)

An example in Maya demonstrating how to implement multithreading to avoid locking up the main UI during long running operations.

24 - Multithreading (Part 3)

A standalone application example illustrating how to gracefully shutdown and cleanup threads.

25 -Separating the Logic and UI (Part 1)

A discussion about the separation of logic from the UI code -- what it means, how it is implemented and the benefits of developing tools using this approach.

26 -Separating the Logic and UI (Part 2)

A practical Python example, illustrating the concepts discussed in the previous lesson, using three different versions of a lighting tool for Maya.

27 - Logging (Part 1)

An introduction to logging in Python and the importance it has in the production pipeline for providing clear, concise and targeted information to both developers and the end user.

28 - Logging (Part 2)

A short example demonstrating the basics of Python’s built in Logger class with an introduction to stream handlers and formatting.

29 - Logging (Part 3)

The implementation of a custom, reusable logger class that wraps the logging module and greatly simplifies the logging process.

30 - Logging (Part 4)

Continuing on from the previous lesson, the remaining methods of the custom logger class are implemented.

31 - Logging (Part 5)

Wrapping up the custom logger class, support for logging to a file is added.

32 - Logging in Maya

When using the Python logging module in Maya there are a couple of issues that need to be addressed.

33 - Extending the Logger Class

Whether you want to change the logger name, the message formatting or replace the default handler, subclassing is a straightforward solution.

34 - Logging to a Qt Widget

Learn how to redirect Python logging messages to a Qt Widget so that the end user can see them inside Qt-based applications (e.g. output window).

Related Courses