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 8. Unleashing the Maya API through Python

In this chapter, we will synthesize everything we've learned so far into a module that may change the way you think about Python and Maya programming. We will develop a library that will allow you to create Maya plugins with minimal code in a very Pythonic style, hiding away the complexities of working with the Maya Python API. It will show you how well designed and powerful both Maya and Python are, and the beautiful things they can create together.

We'll start by building a Maya dependency graph plugin using standard API techniques. This will demonstrate Maya's Dependency Graph concepts of input attributes, output attributes, and the compute method. We'll look at the gotchas, boilerplate, and complexities involved in creating a dependency graph plugin.

After that, we will learn about Python metaprogramming. We will put this knowledge to use building the node factory module, which will eliminate the difficulties encountered while building...