In this chapter, we'll explore the concept of composable code. We start by defining the term. We then examine composable and non-composable examples to better understand what composability is, and improve code by refactoring. We will learn about important techniques to maximize composability, such as predicates, list comprehensions, contracts, closures, and docstrings. We put these techniques to work by building a library to convert a hierarchy of transforms into joints. After that, we compose this library into a configurable higher-level tool for creating characters. Finally, we will look at some issues and solutions surrounding PyMEL, composability, and performance.
Practical Maya Programming with Python
By :
Practical Maya Programming with Python
By:
Overview of this book
Table of Contents (17 chapters)
Practical Maya Programming with Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Introspecting Maya, Python, and PyMEL
Writing Composable Code
Dealing with Errors
Leveraging Context Managers and Decorators in Maya
Building Graphical User Interfaces for Maya
Automating Maya from the Outside
Taming the Maya API
Unleashing the Maya API through Python
Becoming a Part of the Python Community
Python Best Practices
Index
Customer Reviews