Friday 30 October 2009

Maya Python and Python

Okay, I had to take the plunge. I took a bit of last week and this week to sit down and work through reading an XML file into Maya and operating with the data - feeding it into a UI and writing the information to a new file.

Since this exercise took place at work, I was grateful to have on hand programmers who were familiar with Python. More than anything they aided in the streamlining of my Python script which would have been naturally cluttered had I produced a comparable MEL script. The indenting in Python does take a bit of getting used to though!

Python is a really robust language, one I wished I took up back in 2008 when I discovered Maya 2008 had its own implementation. Sadly, Maya Python is unlike Python because it serves as a wrapper for MEL. However I was able to install PyWin32 for a quick test to automate Photoshop - powerful indeed!

All I can say is, if there's one language you must learn to automate your tasks, it has to be Python. As a side note, I read Blur Studio has recently developed an implementation of Python for 3DSMax. Gosh!