2010

Table Of Contents
NOTE MEL also has an alternate syntax, which implements commands and flags
in a method similar to the C programming language. For more information, see
MEL for programmers in the MEL and Expressions guide.
Getting help on MEL
You can get help with MEL in three ways:
To access help on a particular MEL command, open the MEL Command
Reference by selecting Help > MEL Command Reference.
Help can also be accessed from within the Script Editor by using the Maya
Command help. For example, entering help sphere shows a list of flags
that can be used with the sphere command.
More information on all aspects of using MEL commands is also available
in the MEL and Expressions guide, part of the Maya Help. Open the Maya
Help and select Using Maya > General > MEL and Expressions.
Basics of Python
Python and MEL are scripting languages with equal prominence and
capabilities in Maya. Python can access all the Maya commands that MEL
does.
Python accesses Maya commands through the Python module maya.cmds.
Modules in Python are sets of commands that add functionality to Python,
and must be imported before using any of the commands from a module.
Flags in Python are implemented through Pythons named arguments. You
specify which argument to modify and use the assignment operator (=) to
assign a new value to the argument.
In order to run this or any example command, you must have imported the
Python module first. Enter import maya.cmds before starting to enter Python
commands.
654 | Chapter 13 Scripting in Maya