O'Reilly logo

Practical Maya Programming with Python by Robert Galanakis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the request-reply automation system

Finally, we can begin putting theory into practice, and build our request-reply Maya automation system.

We'll start by learning how Python packages work, how to bootstrap Maya from another process, and how process pipes work. After that, we will set up a bare bones client and server. Once that is working, we will add support for exec and eval, exceptions, timeouts, and more.

Creating a Python package

Before writing our code, we need to create some files. Because these files are all closely related, we can put them in a folder and create a Python package.

Start by creating a mayaserver directory in your development root. For this book, that is C:\mayapybook\pylib\mayaserver. Inside, create three empty files: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required