PySide2 for Maya

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

Become a Patron!

Overview

PySide2 for Maya is an ongoing series for anyone interested in learning about the Qt framework and how to use PySide2 to create advanced user interfaces in Maya.
* This is a Patreon series. Project files and videos marked with a Patreon logo are Total Access exclusives.

Videos

34 Videos (4 hours 38 minutes)

00 - Introduction

The first video in this series provides a high level overview of Qt and PySide2. Additionally, it outlines the goals for the series and details the primary tools used in upcoming videos.

01 - Creating a Dialog

Get started with PySide2 in Maya by creating a simple dialog. Learn how to extend QDialog to create your own TestDialog class and parent it to Maya's main window.

02 - Adding Widgets

Building on the empty TestDialog class created in the previous lesson, this video illustrates how to add widgets (buttons, checkboxes, etc...) to a dialog.

03 - Layout Basics

To improve the look of of TestDialog, this video explores some of the different layouts available in Qt and demonstrates how to use them to create a visually appealing user interface.

04 - Deleting a Dialog

To help with the development process, and to avoid having multiple instances of a dialog visible at the same time, this video demonstrates one method for deleting an old dialog before creating a new one.

05 - Signals and Slots (Part 1)

It's time to make TestDialog interactive. Signals and slots allow for communication between two objects and this is one of the most powerful benefits of working with Qt.

06 - Documentation

Before diving deeper into Qt and PySide2, I take a moment to explore the online documentation and explain how I choose to use it.

07 - Signals and Slots (Part 2)

Learn how to make connections to signals that pass one or more argument and how to create slots for overloaded signals (signals with the same name but different parameters).

08 - Signals and Slots (Part 3)

Further expanding on signals and slots in Qt, learn how to create and emit your own signals in PySide2.

09 - Open Import Dialog (Part 1)

An introduction to the first mini-project in the series -- creating a tool to select Maya scene files and open, import or reference them into the current scene.

10 - Open Import Dialog (Part 2)

Starting with an empty template, create the UI for the dialog and make the required connections to stubbed slots (implemented in later videos).

11 - Open Import Dialog (Part 3)

Discover how to access the images (resources) available in Maya and how to use them, instead of text, on your buttons.

12 - Open Import Dialog (Part 4)

It's time to add some functionality by allowing a user to select a file using the QFileDialog widget and to toggle the Force checkbox visiblity using the radio buttons.

13 - Open Import Dialog (Part 5)

The final step in this mini-project is to add the code to open, import or reference a Maya scene file, based on the selected type.

14 - Pipeline Tips 01

Learn how to modify the previous example's code for release in a production environment or to the public. These changes allow PySide2 tools to be easily integrated into Maya's shelves and menus.

15 - Modal Dialogs

A look at modal dialogs, what they are and how they can be used. This includes examples of Qt's standard dialogs as well as the creation of your own custom modal dialog.

16 - Standard Dialogs

A brief overview of the most commonly used standard dialogs available in Qt.

17 - QListWidget Basics

Learn the basics of QListWidget by creating a dialog that allows a user to change the render resolution in the Render Settings by simply selecting an item from a list widget.

18 - QListWidget Multi-Select

A look at the different multi-selection modes available in QListWidget and how to go about changing the selection mode.

19 - QTableWidgets (Part 1)

Learn the basics of QTableWidgets by building a practical tool for Maya that populates a table with all of the meshes in the current scene. Each row contains the transform node name, its translate values and visibility state. The cells of the table are editable and any changes to a cell updates the node in the scene.

20 - QTableWidgets (Part 2)

Starting with an empty dialog template, this lesson adds a QTableWidget and populates it with the node name and attributes for each mesh in the current Maya scene.

21 - QTableWidgets (Part 3)

A common problem when creating dialogs using Qt in Maya is keypresses being unexpectedly passed to Maya’s main window. This lesson covers how to consume these keypresses and then adds functionality that updates the node name in the Maya scene when it is changed in the table.

22 - QTableWidgets (Part 4)

To complete the dialog’s functionality, this lesson adds the code necessary to propagate changes to attribute values in the table to the nodes in the Maya scene.

23 - QTableWidgets (Part 5)

In the final lesson of this mini-series, learn how to insert your own QWidgets into QTableWidget cells.

24 - QSpinBox

A brief look at the QSpinBox and QDoubleSpinBox widgets.

25 - Pipeline Tips 02

To improve the user experience, it is often good practice to show a window at the same position it was last closed at.

26 - Maya's Resource Browser

A look at Maya's Resource Browser -- a helpful utility for finding the resource paths of images built into Maya.

27 - QTreeView File Explorer

A look at the QTreeView class and how to create a file explorer using a tree view.

28 - Outliner Example (Part 1)

An overview of the Outliner mini-project -- a dialog that implements a subset of the functionality found in Maya's Outliner.

29 - Outliner Example (Part 2)

To begin creating the Outliner, a QTreeWidget is added to the base dialog and populated with a list of objects in the current Maya scene (maintaining the parent/child hierarchy).

30 - Outliner Example (Part 3)

In this lesson, the remaining functionality of the tree view is implemented. This includes adding node type icons to each item and modifying the selection in the current scene when an item is selected.

31 - Outliner Example (Part 4)

In addition to introducing viewers to the QMenuBar class, this lesson also illustrates how to work with QActions and add keyboard shortcuts.

32 - Outliner Example (Part 5)

To finish up the general functionality of the Simple Outliner, a right-click context menu is added to the dialog.

33 - Outliner Example (Part 6)

In the final part of the Simple Outliner mini-project, I demonstrate how to keep the selected items in the outliner "in sync" when the object selection changes in the scene.