Maya Python for Games and Film

Posted by STLR, 15 November 2012 2:05 pm

I began to make the switch from MEL to Python a couple of years ago.  It was actually a slow and somewhat painful process.  I had been using MEL for roughly a decade, so any time I had to write script it was often just easier (and much faster) to fall back on what I knew.  I'll admit that I'm kind of old and lazy and you know what they say about teaching an old (and lazy) dog new tricks.  Luckily, I did finally overcome my laziness (although I'm still fighting the old part) and I now feel pretty comfortable with Python.

One of the biggest obstacles for me when taking the plunge was finding good learning resources.  I of course bought a couple of general Python reference manuals and learning books, but these were not at all specific to Maya, not to mention the Maya API, PyMEL, QT, etc...  I was also able to cobble together some decent example scripts as well as a useful blog post here and there, but that took time.  Eventually I got to the point where I could finally write a complete script from beginning to end while leaning on the various resources I’d pooled together. 

After trudging my way through this slow learning process, I was very happy to learn that someone has finally written a Maya specific Python book.  Back last spring at GDC I met Ryan Trowbridge who has been a character TD at Naughty Dog for a number of years.   He was telling me about a book that he had written that was all about Python in Maya.  I finally got around to checking it out over the last few weeks.  I’ve had some much needed down time lately and I’ve been meaning to beef up on my Python skills for a while now anyway.  So as a refresher I went through the first few chapters of his book and it is indeed incredibly useful.  I just wish I’d had it 2-3 years ago :(  But better late than never :)

Maya Python for Games and Film by Ryan Trowbridge and Adam Mechtley

So if you know Maya and maybe some MEL but you’ve been meaning to start learning Python and keep putting it off, or if you already know some Python but have been wanting to brush up on some details, or if you know Python fairly well but are not quite sure how it relates to Maya, then I highly recommend investing in this handy resource.




Posted 15 November 2012 8:32 pm

We bought this book during GDC12, I cannot tell how much useful it is. I began the switch from MEL to Python a couple of months ago, and I can also assure you this is most definitely the best book out there.


Posted 16 November 2012 6:15 pm

The book is very useful. Unfortunately I'm finding a lack of examples on how to use the new Maya API 2.0. The book mentions it but continues to use the older API, as does even Maya's own examples. Is there a good resource for looking into the 2.0 version, because I've been having issues getting it to work.

Still, I find it's amazing I can do API programming in Python, and this has been a huge help in learning it.


Posted 16 November 2012 8:08 pm

I agree, this book is an terrific resource!


Posted 24 November 2012 10:46 pm

I am a total noob at mel scripting and know nothing about python. If one were to start learning this stuff should you still begin with MEL? What advantages does python offer over MEL?


Posted 26 November 2012 4:11 pm

ianucci - you may as well go straight to Python. Whatever you can do with MEL you can do with Python, but Python goes above and beyond MEL. It's a much more versatile and flexible scripting language and has a much wider community. It also allows you to access Maya's API. You may never need to do that but still. It has also become the preferred scripting language for most studios (game and film)


Posted 27 November 2012 9:33 am

the best part of the book is the how well the authors goes explaining OOP concept using the human class, I dont know why they didn't explained using super() for which I had to go through pain understanding it, now that I have reached chap 8 I wished they had some good tool like a pose manager using maya command module but nothing built in qt but they dont, other wise book is very good for beginner

I am looking forward for something like building node based particle system or custom shaped flying button(not menus) in modalpanel...


Posted 14 December 2012 12:59 am

Hey ianucci (and anyone else interested).
I wrote a lengthy brain dump on our production pipeline here at Sony Online Entertainment a while back.

One of the "Chapters" deals with the advantages of Python (PyMel) over both mel and regular maya.cmds.




Posted 2 May 2013 3:09 am


What is all that ??

incredible !

Add Your Comment

You must be logged in to post a comment.

Please only report comments that are spam or abusive.