Creating the hierarchy converter GUI

In this section we'll create a PySide user interface for the character creator/hierarchy converter we worked on in Chapter 2, Writing Composable Code. The GUI will respond to the user changing selection, and when the user interacts with the GUI, it will update the Maya scene. This project will teach us the fundamental concepts that allow the decoupling of Maya and PySide components. This decoupling allows an ever-more-complex set of interactions while still keeping the code maintainable.

Creating the window

Our GUI will be a Python script like any other. Let's make a file in our development root C:\mayapybook\pylib. Open it up in your IDE and write:

from qtshim import QtGui, QtCore, Signal ...

Get Practical Maya Programming with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.