PyMEL for Maya

PyMEL makes python scripting in Maya work the way it should. Maya’s command module is a direct translation of MEL commands into python functions. The result is a very awkward and unpythonic syntax which does not take advantage of python’s strengths – particularly, a flexible, object-oriented design. PyMEL builds on the cmds module by organizing many of its commands into a class hierarchy, and by customizing them to operate in a more succinct and intuitive way.

Chapters:

Appendices:

pymel.versions Contains functions for easily comparing versions of Maya with the current running version.
pymel.mayautils
pymel.core.animation functions related to animation
pymel.core.effects Functions related to fx
pymel.core.general Contains general node and attribute functions, as well as the main PyNode base class.
pymel.core.language Functions and classes related to scripting, including MelGlobals and Mel
pymel.core.modeling functions related to modeling
pymel.core.other Functions which are not listed in the maya documentation, such as commands created by plugins,
pymel.core.rendering Functions related to rendering
pymel.core.runtime Runtime commands.
pymel.core.system Functions and classes relating to files, references, and system calls.
pymel.core.windows Functions for creating UI elements, as well as their class counterparts.
pymel.core.context Contains all context command functions (previously ‘ctx’).
pymel.core.datatypes A wrap of Maya’s Vector, Point, Color, Matrix, TransformationMatrix, Quaternion, EulerRotation types
pymel.core.nodetypes Contains classes corresponding to the Maya type hierarchy, including DependNode, Transform, Mesh, and Camera.
pymel.core.uitypes
pymel.util General utilities which are pymel-independent.”
pymel.util.arguments Defines arguments manipulation utilities, like checking if an argument is iterable, flattening a nested arguments list, etc.
pymel.util.arrays A generic n-dimensionnal Array class serving as base for arbitrary length VectorN and MatrixN classes
pymel.util.common Commonly used utilities
pymel.util.decoration
pymel.util.enum Robust enumerated type support in Python
pymel.util.mathutils Defines useful math functions.
pymel.util.namedtuple Returns a new subclass of tuple with named fields.
pymel.util.path Represents a filesystem path.
pymel.util.utilitytypes Defines common types and type related utilities: Singleton, etc.
pymel.tools.mel2py Convert mel scripts into python scripts.
pymel.tools.py2mel Convert python callables into MEL procedures
pymel.tools.loggingControl
pymel.api.plugins Maya API plugin utilities

Special Thanks

Special thanks to those studios with the foresight to support an open-source project of this nature: Luma Pictures, Attitude Studio, and ImageMovers Digital.

Table Of Contents

Next topic

What’s New

Core

Core Modules

Other Modules

This Page