This podcast will synthesize most of the information covered throughout the blog and provide an example of how to create a MEL script and add it to the shelf, from scratch.
This blog is about Autodesk's Maya 3D package. I cover different subjects as I see fit - MEL scripting, Rigging, Modeling, Texturing, Lighting, Rendering, and Compositing - usually just to synthesize what I've learned and simply be a resource for myself. Hopefully, others can benefit though. Whatever the subject, it all has to do with my mistress, Maya. My fiancee hates her... and someimes I hate Maya, too. @_@
Friday, December 2, 2011
Thursday, December 1, 2011
Guest Blog: OpenArtBox's Tips for Maya Users
Here's a couple of tips for Maya users from OpenArtBox.blogspot.com, a blog dedicated to open source art and design software.
An Open Source Solution: Blender
If you need a 3D modeling program but can't afford Maya, you might want to try Blender, which is a FOSS (free and open source software) alternative. A quick scan of a few forum threads indicates that there are many people who actually prefer Blender to Maya. For example, in one thread entitled “Blender vs. Maya” on GameArtisans.org, there has been a back and forth between Blender proponents and Maya proponents:Maya Proponent: “...kinda like saying Bicycle vs Porsche. Sure they both get you there but one does it in style.”
Blender Proponent: “...actually Blender's interface is way sexier than Maya's.”
Maya Proponent: “I don't like Blender...(it's) weird...”
Some of those who entered into the discussion took more neutral positions.
“Ultimately, it doesn't matter what you use on a personal basis,” one comment read. “What matters is your understanding of how to model and the core concepts of UV layout, mesh creation and management, etc...A tool is a tool. What matters is how you make use of those tools. Being biased towards Blender because it is free or open source is kind of silly. Thinking Maya is an amazing program right out of the box is silly as well, and also naive.”
Python Scripting in Maya
Both Blender and Maya 8.5 and later include built in Python interpreters. Python is a cross-platform programming language that can be used by even commercial products such as Maya because of its open source license. This is what a simple “Hello World” program looks like in Python:
print “Hello World!”
To call this program in Maya, we name the program helloworld.py and type the following in the MEL Script Editor:
pySource helloworld;
Calling MEL from a Python Script
When you run Python scripts in Maya, you can actually call any MEL function from Python. To do this, you need to import MEL into your Python script and place wrappers around the MEL commands. Here is an example:
When you run Python scripts in Maya, you can actually call any MEL function from Python. To do this, you need to import MEL into your Python script and place wrappers around the MEL commands. Here is an example:
from maya import mel
mel.confirmDialog(message="Hello World!", button=["OK"]);
This Python program uses a MEL command to place the “Hello World!” method in a dialog box.
More Information on Python Scripting
A full tutorial about Python scripting in Maya, written by Matthias Baas, can be found here: http://cgkit.sourceforge.net/maya_tutorials/intro/
Carrie Sullivan is a student at UT-Dallas.
She writes a blog about Linux, a free and open source operating system that thrives from a community who help modify and distribute Linux’s source code to build functionality and customization.
You can read her blog at OpenArtBox.blogspot.com
Resources
Blender vs. Maya. (2010, July 1). Retrieved December 1, 2011 from GameArtisans: http://www.gameartisans.org/forums/showthread.php?t=15099
Python/Maya Introductory Tutorial. (2006, May 8). Retrieved December 1, 2011 from SourceForge: http://cgkit.sourceforge.net/maya_tutorials/intro/
Python Programming Language, Official Website. Retrieved December 1, 2011 from Python: http://www.python.org
Subscribe to:
Comments (Atom)