Summary

In this chapter, we learned about object-oriented programming and how to use the Maya Python API. We saw the power of inheritance and how to draw shapes into the Maya viewport using OpenGL. Then we learned about the inner workings of the Maya Python API bindings, how to navigate the Maya API Reference, and how MObjects and function sets work.

We accomplished a number of tasks with the API which demonstrated common patterns. We used the powerful MFnMesh class to build a mesh from scratch, wrestled with the MScriptUtil class and pass by reference pattern, and saw how OpenMaya callbacks are used. We ended the chapter by implementing a command plugin for playing sound.

Throughout this chapter we also saw various problems with the 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.