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!

Wednesday 9 September 2009

Maya Mirror UV tool

I've been spending the last couple of nights figuring out a nice mirror UV editing tool for Maya (suggested by one of the artists on TruSim). I was initially thinking of using the MayaPythonAPI, but for ease of testing the concept I stuck with MEL - I'm not even close to dabbling with the Maya C++ API ;)

At present I can select a point and based on a mirror plane, the tool will select the closest point on the opposite side of the mirror plane. I have to admit my level of math is basic and using dot products, acos and so forth is proving to be a challenge.

Hopefully some results to show off soon.

Tuesday 25 August 2009

The Beginning...

Welcome! I've been meaning to start a blog for a while now, mostly to jot down ideas in an area I can always access.

I'll be covering topics relating to workflow in ZBrush, Maya, MEL scripting (Maya Embedded Language) and some MayaPython. That last one is a bit lost on me still as many have said it is a horrid implementation of Python and Autodesk essentially used Python as a wrapper for MEL. However, I can see the PythonAPI to be of use in the future when not having a C++ environment to hand.

From time to time I'll also post updates of any personal 3D work I happen to be working on at the time and it'll certainly be great to chart the progress of a project here rather than on a CG forum.