Book Image

Practical Maya Programming with Python

By : Robert Galanakis
Book Image

Practical Maya Programming with Python

By: Robert Galanakis

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
Index

Chapter 7. Taming the Maya API

Maya's Python command system, MEL, is extremely powerful. You can use it to automate and customize Maya to an incredible degree. Python and PyMEL have largely superseded MEL because they are much more powerful and flexible. We've put this power and flexibility to great use by creating composable libraries, robust error handling, an automation system, and maintainable GUIs.

What we haven't yet discussed is Python's role in augmenting, and in many cases replacing, C++ in Maya programming. There are some things that the command system and MEL are designed to not do. Dealing with the Maya Application Programming Interface (API) is one such thing. Python, however, can utilize most of the Maya API that C++ has access to. In Chapter 8, Unleashing the Maya API through Python, we will see how Python allows us to do things we cannot even do in C++, and easily create custom Maya plugins in a very Pythonic way with no boilerplate.

Before we jump into that we will use this...