O'Reilly logo

Practical Maya Programming with Python by Robert Galanakis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 hierarchyconvertergui.py in our development root C:\mayapybook\pylib. Open it up in your IDE and write:

from qtshim import QtGui, QtCore, Signal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required