Title Image

Maya Python API

Level:
Intermediate
Software:
Maya (2017+)
Language:
Python
Duration:
5 hours 19 minutes
Instructor:
Chris Zurbrigg

Become a Patron!

Overview

A comprehensive ongoing series for anyone who would like to learn how to extend Maya's functionality by leveraging the Maya Python API 2.0.
* This is a Patreon series. Project files and videos marked with a Patreon logo are Total Access exclusives.

Videos

30 Videos (5 hours 19 minutes)

00 - Introduction

A very high level overview of the Maya API and what viewers can expect from this series.

01 - What is the Maya API

Before diving into Maya API examples, it is important to first understand what the Maya API is, what functionality if offers beyond that of scripting with Maya Commands and what the trade-offs are.

02 - Maya API vs Maya Commands

A look at the advantages and disadvantages of using the Maya API and when it is most beneficial to use it.

03 - C++ vs Python

A short discussion on the pros and cons of using Python, as opposed to C++, to leverage the Maya API.

04 - Maya Python API 2.0

The latest version of the Python API, which improves performance and simplifies many operations, but does have some caveats.

05 - Undo and Redo

When using the Maya API, it is the developer's responsibility to implement the undo and redo functionality. A failure to correctly implement undo/redo operations can corrupt the undo stack and break the scene (as demonstrated in this lesson).

06 - Maya Plugin Basics

A brief look at how plug-ins differ from scripts, the different methods for loading and unload plug-ins and what information can be obtained from Maya’s Plug-in Manager.

07 - Maya Plugin Template

A detailed look at the minimum code required to create plugins for Maya using the Maya Python API 2.0. This template will become the foundation for most of the examples in this series.

08 - HelloWorld Command

A short example that extends Maya by creating and registering a new HelloWorld command.

09 - HelloWorld Node (Part 1)

Building on the previous lesson, and to further reinforce the basics of plugin creation, the HelloWorld node example creates a new node that displays a text overlay in a VP 2.0 viewport.

10 - HelloWorld Node (Part 2)

To finish up the HelloWorld node example, a draw override is added to the plugin that allows custom draw code to be added to the node.

11 - Documentation and DevKit

An introduction to the official Maya API documentation and the samples provided by Maya's DevKit.

12 - Maya API Basics (Part 1)

To effectively utilize the Maya API, it is important to have a firm understanding of the different types of classes that are available in the API and how they can be used to interact with Maya.

13 - Maya API Basics (Part 2)

A detailed example to reinforce the idea of function sets and how they are used to access MObject data.

14 - The Dependency Graph

Before digging deeper into the Maya API, it is essential to first have a solid understanding of Maya's Dependency Graph.

15 - Nodes

Nodes are one of the essential building blocks of the Dependency Graph and this lesson takes a detailed look at their structure and the data flow approach used by Maya to update the DG.

16 - Modifying Attributes

A detailed look at querying and editing a node's attributes using the Maya Python API.

17 - Custom Nodes

With a clear understanding of Maya’s dependency graph, nodes, connections, plugs, the compute method and push-pull data flow it’s time to look at how to write custom nodes using the Maya API.

18 - Simple Math Node (Part 1)

To reinforce the concepts taught over the past few lessons, and to ease into the creation of custom nodes, this example creates a very simply math node, one that multiplies two number together and outputs the resulting value.

19 - Simple Math Node (Part 2)

Continuing on from the previous video, in this lesson input and output attributes are added to the node and configured for use in Maya's Node Editor.

20 - Simple Math Node (Part 3)

In the final part of this example, the compute method is implemented -- updating the output attribute value whenever the multiplier or multiplicand value changes.

21 - Attribute Properties

A detailed look at the most common attribute properties and how they affect an attribute.

22 - Development Tips 01

An often overlooked way to speed up Maya's startup and shutdown times, which is important for plug-in development due to frequent restarts and crashes.

23 - Rolling Node

A second node example to reinforce the fundamentals of attributes, the compute method and also demonstrate a method for speeding up the iteration and testing process.

24 - Development Tips 02

How to identify when a node is not being deregistered and the impact it can have on the development process.

25 - Command Basics (Part 1)

An overview of the MPxCommand class, its methods and the requirements for creating custom Maya commands using the Maya Python API.

26 - Command Basics (Part 2)

The creation of a simple command that illustrates how the MPxCommand methods, described in the previous lesson, are implemented, as well as when, and in what order they are called.

27 - Command Basics (Part 3)

A detailed look at setting up the syntax for a command and parsing arguments when a command is executed.

28 - Command Basics (Part 4)

In addition to passing arguments to a command using flags, as seen in the previous lesson, arguments can also be passed as command arguments or object selections.

29 - Command Basics (Part 5)

Wrapping up the section on command basics, the SimpleCmd class is reworked so that it is more representative of an actual production command. This includes utilizing the edit and query flags, and implementing undo support for editable flags.

Additional Videos Coming Soon...