Title Image

Maya API: Python to C++ (Vol. 1)

Maya (2018+), Visual Studio
6 hours 8 minutes
Chris Zurbrigg

Become a Patron!


A series designed for anyone who is familiar with the Maya Python API and would like to transition to the native C++ API to create, or port, Maya plugins.
* This is a Patreon series. Project files and videos marked with a Patreon logo are Total Access exclusives.

Course Outline

28 Videos (6 hours 8 minutes)

00 - Introduction

A short overview of this series, the course requirements and what viewers can expect in the upcoming lessons.

01 - Build Environment Overview

An overview of the build environment requirements to create C++ plugins for Maya including build tools, compiler requirements and software/sdk versions.

02 - Installing Visual Studio

A walkthrough of the Visual Studio installation process to ensure the correct environment and build tools are installed for Maya development.

03 - Creating a Maya Plugin Project

A step-by-step guide walking through the complete setup of a Visual Studio project for building Maya plug-ins on Windows. A supplemental pdf document is included in the project files.

04 - Empty Maya Plugin

An example implementing the minimum code required to load and unload a C++ plugin in Maya.

05 - Example Projects

Details on building the example projects and the configuration changes required for different versions of Maya.

06 - Improving Build Workflow

Automate the process of moving new plugin builds to Maya's plugin directory using post-build events.

07 - HelloWorld Command (Part 1)

Building on the EmptyPlugin example, this lesson walks through the implementation of a simple command using the C++ API.

08 - HelloWorld Command (Part 2)

Wrapping up the HelloWorld command example, the command is registered with the plugin and an alternate method of outputting text is introduced.

09 - Common Build Errors

A look at some common build errors that may occur during the development of C++ plugins for Maya.

10 - MStatus

An overview of the MStatus class — what it is and how it can be used to detect and interpret various API errors.

11 - HelloWorld Node (Part 1)

In this example, a custom node is implemented that can be used to display text in a VP2.0 viewport.

12 - HelloWorld Node (Part 2)

Continuing on from the previous lesson, this video implements the draw override class responsible for drawing to the VP2.0 viewport.

13 - HelloWorld Node (Part 3)

Wrapping up the HelloWorld Node example, the node and draw override classes are registered with the plugin.

14 - Automating Plugin Reloads (Part 1)

A detailed look at how custom Python scripts can be used to significantly improve the build and test process by, among other things, automating plugin unloading and loading at build time.

15 - Automating Plugin Reloads (Part 2)

Continuing on from the previous lesson, calls to the Python scripts are added to the project's build properties allowing them to be executed at the appropriate times during the build process.

16 - Visual Studio Extensions

Visual Studio is an incredibly powerful and feature-rich IDE but there are still a handful of extensions that I rely on for everyday use.

17 - Multiply Node

A port of the simple math node example demonstrating how to add input and output attributes to a custom node and override the compute method.

18 - Debugging Basics (Part 1)

An introduction to debug builds and the interactive debugging of Maya plugins in Visual Studio.

19 - Debugging Basics (Part 2)

A look at the Visual Studio debugger — attaching it to Maya and setting breakpoints in plugin code.

20 - Debugging Basics (Part 3)

The basics of interactive debugging — stepping through plugin code and inspecting variables using the Visual Studio debugger.

21 - Debugging Basics (Part 4)

Wrapping up the basics of debugging, this video highlights the different types of breakpoints available in Visual Studio and the situations where they are most useful.

22 - Rolling Node

A C++ port of the Rolling Node example from the Maya Python API series.

23 - Organizing a Project

A discussion on project layout, code organization and how I personally structure larger Maya C++ plugin projects.

24 - Simple Command (Part 1)

A port of the simple command example demonstrating the creation of a custom command that can edit and query an object's attributes.

25 - Simple Command (Part 2)

Continuing on from the previous lesson, this video details the steps required to add flags and define the command syntax.

26 - Simple Command (Part 3)

A walk through of doIt method's implementation -- used for one time set up and command parsing.

27 - Simple Command (Part 4)

Wrapping up the simple command example, the undo and redo logic for the command's flag combinations is implemented.

Related Courses