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

Understanding the Maya startup routine


Most of our design so far has been Maya agnostic. We will now switch gears and focus on Maya, understanding how Maya starts up and how we can use Python to control the startup routine. We'll start with a brief digression to look at Maya's batch and GUI modes. Then we'll understand how Maya starts up and some of its configuration options. Finally, we'll step back and take a higher-level view of how we want to control the startup, so that we know what sort of code to write when we actually implement our automation system.

Using batch mode versus GUI mode

Maya can run in either its normal GUI mode, or in batch mode, which is Maya without any GUI. Code can query which mode is active by calling pmc.about(batch=True). Almost every Maya or PyMEL command will work in batch mode, though you may run into some that only work in GUI mode.

Most usage of the Maya server will probably be in batch mode. There are many legitimate uses for a GUI version of Maya running...