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, ...
Get Practical Maya Programming with Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.