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

Writing a skeleton converter library

Let's put composability to work for us. We'll implement a true rite of passage for programming in Maya—a routine to automatically convert a hierarchy of nodes into a hierarchy of joints (a skeleton). This task allows us to focus on building small, composable pieces of code, and string them together so that the character creator tool we build later in the chapter can be very simple. These composable pieces won't just serve our character creator. They'll serve us all throughout the book and our coding lives.

Writing the docstring and pseudocode

Before we start coding, we need a place to put the code. Create the skeletonutils.py file inside the development root you chose in Chapter 1, Introspecting Maya, Python, ...

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