Extension for Autodesk Maya 2015
Python API 2.0
Over 130 new classes have been added to the Python API 2.0, including MPxNode, MPxData and much of the Rendering API.
Over 15 devkit examples are also available, and can be found in the devkit\plug-ins\scripted directory of the Maya installation. All Python API 2.0 devkit examples are named
with the prefix py.
For more information, see Maya Python API 2.0 Reference.
New Profiler classes
Two new classes, MProfiler and MProfilingScope, have been added that allow you to work with Maya's . The allows you to locate performance bottlenecks in your scene by recording and demonstrating
in a graph the amount of time that each process consumes.
In Maya, select to open the window.
The MProfiler class provides functions such as:
- addCategory() to add a category to the
- getEventTime() to return the event time
- getBufferSize() to return the buffer size of the
For more information, see the MProfiler class documentation.
The MProfilingScope::MProfilingScope() method allows you to instrument the function that you want to profile.
To enable profiling, you can click in the window; or, use the MEL or Python profiler command.
For more information on the window, see Profiler in the Maya User's Guide. For more information on the profiler command, see the MEL Commands and Python Commands documentation.
The new MColorManagementUtilities class allows the caller to retrieve color management information from Maya. This
class provides methods to query whether the color management feature is available
(given proper user entitlement), whether color management is enabled in the scene,
and to retrieve color transform IDs from color transform names.
The new MFragmentManager::removeFragment() function now allows you to change a fragment by removing and adding it again during
Maya run-time. In addition, using this method, you can also replace Maya's default
fragments with your own.
UI Draw Manager Enhancements
- Font style control. The following new methods have been added:
- MUIDrawManager::setFontIncline() controls the font incline. User needs to pass in a font incline type as input. By
default, Maya uses normal incline rather than italic incline. Refer to the enum TextIncline for applicable values.
- MUIDrawManager::setFontWeight() controls the font weight. User needs to pass in a font weight factor as input to
change the font weight, which ranges from 1 - 99. MUIDrawManager provides the user with 5 pre-defined factors that are commonly used. Currently, only
light and bold weights are supported perfectly for most of the font families. By default,
Maya uses bold weight. Refer to the enum TextWeight for applicable values.
- MUIDrawManager::setFontStretch() controls the font stretch. User needs to pass in a font stretch factor as input,
which ranges from 1 - 4000. MUIDrawManager provides the user with 9 pre-defined factors that are commonly used. Commonly used
factors are between 50 - 200. Refer to the enum TextStretch for applicable values.
- MUIDrawManager::setFontLine() controls the font line type. User needs to pass in a font line style factor as input.
MUIDrawManager provides 3 types of line type: overline, underline and strike out. Refer to the enum
TextLine for applicable values.
New PySide examples added
New PySide example scripts have been added to the devkit/pythonScripts folder that demonstrate the fundamental concepts for creating basic PySide scripts.
In addition, the topic Working with PySide in Maya has been added that provides additional information to supplement the example scripts.
The footPrintNode devkit example is now made simpler and demonstrates how to use MUIDrawManager to draw a simple locator in Viewport 2.0.
The original sample is now renamed to rawfootPrintNode which demonstrates how to draw the locator with raw OpenGL/DX calls.
Plug-in code using MUIDrawManager can be written once and used on all platforms and all draw API’s.