Creating a Maya Python plugin

Our tour of the Maya Python API continues with probably its most common use in the wild: creating a Maya plugin with Python. In fact, the entirety of the next chapter is spent working with Maya Python plugins in novel ways. We should have a good understanding of how plugins work before ending our API tour, so the remainder of this chapter will be focused on creating a Maya command plugin with Python. When called, the command will play a sound.

There are several plugin types supported by Maya. Plugin types are denoted by the MPx prefix and are inside the maya.OpenMayaMPx namespace. You can look at the Maya API Reference to get an idea of what's available. All plugins work with basically the same concepts, which we will ...

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.