What's New in API in Maya 2016

The Maya 2016 Developer Kit is now available online at Autodesk Exchange at https://apps.exchange.autodesk.com/MAYA/en/Home/Index.

Jump to the following sections:

API compatibility

Maya 2016 Extension 2 is not binary compatible with Maya 2016. To obtain the Maya 2016 and Maya 2016 Extension 1 API Guide, see http://www.autodesk.com/me-sdk-docs-2016.

C++ plug-ins that were compiled against Maya 2016 or Maya 2016 Extension 1, including Maya 2016 service pack releases, must be re-compiled against Maya 2016 Extension 2 in order to be recognized by this version of Maya.

In addition, plug-ins compiled against Maya 2016 Extension 2 will either not load or exhibit unpredictable behavior if loaded in Maya 2016, Maya 2016 Extension 1, or any Maya 2016 service pack release.

Python API 2.0

Since Extension for Maya 2015, 23 new classes have been added to the Python API 2.0 and additional developer kit examples are also available in the plug-ins\scripted directory of the Maya Developer Kit. All Python API 2.0 developer kit examples are named with the prefix py.

For a list of Python classes added since Extension for Maya 2015, see New Python API 2.0 classes in Maya 2016.

The Python Learning Path is updated to include Python API 2.0 examples.

For more information, see Maya Python API 2.0 Reference.



UI Draw Manager Enhancements

  • The ordering of the calls made through the UI manager interface is now consistent with the ordering used for the legacy default viewport

  • Convenience methods have been added to draw large sets of points or lines:
    • points (const MPointArray& points, bool draw2D) for drawing points in 2d or 3d
    • lineList (const MPointArray& points, bool draw2D) for drawing a list of line segments (1 pair of points per segment) in 2d or 3d
    • lineStrip (const MPointArray& points, bool draw2D) for drawing a line strip (connected line segments) in 2d or 3d
    • The uiDrawManager developer kit example has been modified to include the option to draw using these three new interfaces.
  • To support the drawing of internally specified icons, the following interfaces have been added:
    • icon( const MString &iconName, float scale ) : This method draws a single icon with the specified name and 3d scale.
    • getIconNames( MStringArray &iconNames ) : This static method allows plug-ins to query the list of available icon names to use with the icon() method.

    The uiDrawManager developer kit example has been modified to include the option to draw an icon per locator, as well as the ability to choose the icon name and scale factor from the Attribute Editor. The icon option appears in the UI Type drop-down list and an Icon Parameters section is available that contains drop-down lists for the Icon and Icon Scale attributes.

    This image shows the drawing of a set of icons, where each icon is a locator created using the uiDrawManager developer kit example.

MShaderInstance Enhancements

MShaderManager Enhancements

MRenderItem Enhancements

Shader Fragment Enhancements

  • XML schema files are now available as part of the install in the ..bin/ShadeFragment folder of the Maya installation.

    v2pFragment.xsd is the XML schema for shading fragments, and can also be found in XML Schema for Shading Fragments.

    vp2FragmentGraph.xsd is the XML schema for fragment graphs, and can be found in XML Schema for Fragment Graphs.

  • The XML Schema for Shading Fragments topic has been updated, and the <xs:simpleType name="LanguageType"> section now includes the line <xs:enumeration value="GLSL" />. This line was added because Maya 2016 now supports GLSL fragments.
  • The XML Schema for Fragment Graphs topic has been updated, and the <xs:complexType name="ConnectionListType"> section of the schema has an additional line <xs:attribute name="name" type="xs:string" /> added.
  • The XML file for fragment graph for phong1 topic provides an example XML file of the fragment graph for a shading network rooted at phong1.
  • If a software shader has attributes with names that match the following, and no shader override is specified, then an attempt is made to automatically map these values for display in Viewport 2.0. This feature is provided in addition to the already supported attributes. See XML file for fragment graph for phong1 for more information.
    • translucence: A float attribute type
    • translucenceFocus: A float attribute type
    • translucenceDepth : A float attribute type
    • matteOpacity : A float attribute type
    • mattOpacityMode : A 16, or 32 bit, or enum attribute type

MFrameContext Enhancements

MDrawContext Enhancements

MRenderOverride Enhancements

  • If an override has defined custom MUserRenderOperations, any previously bound vertex buffers are now unbound before the user operation is invoked. Previously, it was up to the user operation to perform this unbind.
  • Previously, when an MRenderOverride does not set override render targets, the targets that were used were of a preset (fixed) format.

    This behavior has been changed to use instead the Viewport 2.0 rendering options for Float Point Render Target and Multisample Anti-aliasing. You can find these settings by selecting Renderer > Viewport 2.0 > to open the Hardware Renderer 2.0 Settings window, and expanding the Anti-aliasing and Floating Point Render Target categories; or, by selecting Render > Render Settings to open the Render Settings window and clicking the Maya Hardware 2.0 tab, then expanding the Anti-aliasing and Floating Point Render Target categories.

    For example, if a floating point format of R32G32B32A32_FLOAT is chosen, then the color render target will attempt to use the same floating point format.

    If a plug-in wishes to use the previous fixed format, than it can define a single color target with format MHWRender::kR8G8B8A8_UNORM, and a single depth target with format MHWRender::D42S8.

  • The viewRenderOverrideFrameCache developer kit plug-in has been modified to output floating point EXR images which can be used in conjunction with setting a floating point format to get unclamped color image output.

  • Added MSceneRender::kNoLight to MSceneRender::MLightingMode that allows the user to set Use No Lights mode in a scene render override.
  • Added MSceneRender::kFlatShaded and MSceneRender::kShadeActiveOnly to MSceneRender::MDisplayMode. MSceneRender::kTextured is now an individual enum that can be used together with MSceneRender::kShaded or MSceneRender::kFlatShaded. These changes allow more control over the display modes the user can set in a scene render override.

    Updated the function viewRenderSceneRender::displayModeOverride() in the viewRenderOverride developer kit example (viewRenderOverrideOperations.cpp) to show the use of kFlatShaded and kShadeActiveOnly.

MRenderOperation Enhancements

MRenderUtilities Enhancements

MPxSubSceneOverride Enhancements

  • Setting of user defined buffers via the MVertexBuffer::resourceHandle() interface has been fixed.
  • Added MPxSubSceneOverride::hasUIDrawables(), MPxSubSceneOverride::areUIDrawablesDirty() and MPxSubSceneOverride::addUIDrawables() to draw simple UI shapes such as lines, circles, text, and so forth.
    • If addUIDrawables() is overridden, then hasUIDrawables() must also be overridden to return true.
    • If areUIDrawablesDirty() returns true, then UI drawables are cleared and re-added every refresh. If the method returns false, then UI drawables persist and are preserved until either the DAG object associated with the override is destroyed or the override is deregistered.
    • The UI drawables do not support instancing draw and transform instances.
    • The apiMeshShape developer kit example (apiMeshSubSceneOverride.cpp) demonstrates use of these functions.

MRenderTarget Enhancements

MTexture Enhancements

MTextureManager Enhancements

  • A new version of MTextureManager::acquireTexture() has been added that acquires a texture from a file on disk.

    MTextureManager::acquireTexture(const MTextureArgments& args) takes the new class MTextureArguments as its input parameter. Using MTextureArguments, you can provide the arguments (such as file path and mip map levels) for the texture that needs to be obtained.

    Essentially, the new MTextureManager::acquireTexture(const MTextureArgments& args) is almost identical to the existing MHWRender::MTextureManager::acquireTexture (const MString & textureName, const MString & contextNodeFullName, int mipmapLevels = 0, bool useExposureControl = true, const MString & layerName = MString(), int alphaChannelIdx = -1) . However, it has added one functionality. It can accept a file texture node that is required if you want to activate texture background loading. You can set the file texture node through the constructor of MTextureArguments or through the method MTextureArguments::setFileTextureNode().

    See the Parallel mode description in the Material Loading Mode documentation in the Display preferences topic of the Maya User Guide for more information.

MPxDrawOverride Enhancements

  • The MPxDrawOverride::boundingBox() function has been changed from a pure virtual function to a virtual function, so that users are not required to always provide an override implementation. The default implementation returns a huge bounding box that will never be culled.

MPxShaderOverride Enhancements

The following new method allows plug-in writers to supply a shader to be used in non-textured mode. If this method is not specified, then a fixed grey shader is always used:

  • MHWRender::MShaderInstance * MHWRender::MPxShaderOverride::nonTexturedShaderInstance ( bool & monitorNode )
  • This MPxShaderOverride::nonTexturedShaderInstance() method returns an override shader instance to be used when drawing in non-textured mode. If NULL is returned, then an internally defined, non-modifiable shader instance is used. Setting the monitorNode parameter on the method to return true indicates that the associated shader node requires monitoring to call back to the override during the update phase.
  • See Effect Overrides for more information.
  • New function MPxShaderOverride::overridesNonMaterialItems() that allows the shader to replace the default effect for a non material item (that is, wireframe, edge/vertex components, and so forth). This can be useful for shader overrides that have displacement.

MVertexBuffer and MIndexBuffer Enhancements

  • MVertexBuffer::resourceHandle() and MIndexBuffer::resourceHandle() are now supported in DirectX11 mode in Viewport 2.0
  • The SubSceneOverride version of the apiMeshShape developer kit example has been updated to demonstrate use of these methods.

    You can test the SubSceneOverride version of the plug-in by following these steps:

    1. In line 2289 of apiMeshShape.cpp, set sUseSubSceneOverride to true
    2. Re-compile the plug-in.
    3. Start Maya in DirectX 11 mode in Viewport 2.0. (Select this option in the Display section of the Preferences window). Ensure that apiMeshShape.mll is located within the folders specified in the MAYA_PLUG_IN_PATH environment variable.
    4. Run following MEL commands
      loadPlugin apiMeshShape;
      createNode apiMesh;
      createNode apiMeshCreator;
      connectAttr apiMeshCreator1.outputSurface apiMesh1.inputSurface ;
      sets -edit -forceElement initialShadingGroup |transform1|apiMesh1;
    5. Switch Viewport 2.0 to bounding box mode, and you will see that the bounding box displays correctly.

Component selection

MPxGeometryOverride Enhancements

MDrawRegistry Enhancements

MPxSubSceneOverride Enhancements

New classes: MSelectionContext, MIntersection, MSelectionInfo and MPxComponentConverter were added to support component selection in Viewport 2.0.

NOTE:The new component selection classes and interfaces only take into effect if either of the following conditions are true, in which case hardware selection is enabled:
  • If you are running Maya in core profile mode
  • If you have set the environment variable MAYA_USE_HARDWARE_SELECTION = 1

Utilities Enhancements

Manipulators Enhancements

Varying parameters Enhancements

  • Added new colorset semantic to shading node override fragment. A 4-float colorset varying parameter represents the vertex color. It is identical to the semantic fcolor, except that multiple colorset varying parameters are supported. See Shading Node Overrides.

Implement a 3rd party renderer in the Hypershade

  • Added new class MPxRenderer that allows plug-ins to implement a 3rd party renderer for rendering in the Material Viewer in the Hypershade.

Renderer Enhancements

Renderer notifications

  • It is now possible for plug-ins to add in pre and post render notifications similar to the interface provided in MUiMessage.

  • MHWRender::MRenderer has the following new interfaces:

    • A notification callback type:
      • typedef void (*NotificationCallback)(MDrawContext& context, void* clientData);
    • A way to add in a notification at a specific semantic point in the rendering pipeline.
    • A way to remove a notification which has been added:
    • The ability to query the number of notifications that exist:
      • unsigned int notificationCount(const MString& semanticLocation) const;

      One key advantage is that it is now possible to directly obtain the offscreen buffer / target used for rendering, while previously it depended mostly on guess-work to find the correct buffer to access. In general, this would be the back buffer for OpenGL; however, this does not work with unified back buffers on Linux. The new interface allows for platform and draw API agnostic access.

Renderer output target size override

  • It is now possible to override the output target size used for rendering in the viewport via the API. This can be used to capture images which are not directly tied to the viewport size; that is, the viewport size does not need to match the capture size.
  • The following new API entry points have need added to MRenderer:
    • void GPUmaximumOutputTargetSize(unsigned int& w, unsigned int& h) const

      This allows the plug-in to query the maximum allowable output target size.

    • void setOutputTargetOverrideSize(unsigned int w, unsigned int h)

      This allows the plug-in to set an override for the output target size.

    • void getOutputTargetOverrideSize(int & w, int & h)

      This allows the plug-in to query the override size values. If none are set, then (-1,-1) is returned.

    • void unsetOutputTargetOverrideSize()

      This allows the plug-in to unset/reset the override size (set back to -1,-1).

    • MStatus outputTargetSize(unsigned int& w, unsigned int& h) const

      This method will now take into account any override output size. This is not a new method.

  • Viewport 2.0 capture example for notifications and override size:
    • The new plug-in example blast2Cmd demonstrates the use of a post notification to capture images to disk. It is similar to the obsolete blastCmd. See Developer Kit examples below for more information.

The following convenience methods were added to MRenderer:

Color management enhancements

Shader semantics supported by Viewport 2.0

The list of Semantics supported by Viewport 2.0 has been updated.

Developer Kit examples

  • Python API 2.0 developer kit examples can be found in the plug-ins\scripted folder. Each shares the same name as its C++ counterpart, but with a py prefix.
  • A new viewObjectSetOverride developer kit example has been added, and a description of the example is provided in Multiple Pass Scene Rendering.

  • A new plug-in onbShader has been added to the developer kit that creates a dependency node as a surface shader called onbShader in Maya.

    In addition to implementing the dependency node, this plug-in also shows a complete implementation of a surface shader for Viewport 2.0.

    It demonstrates how to define and register shading fragments and create a final fragment graph.

    This example differs from the lambertShader/phongShader examples in that it does not re-use Maya's built-in fragments, but instead define its own via the plug-in.

  • A new plug-in simpleNoiseShader has been added to the developer kit that creates a dependency node as a texture shader called simpleNoise, that implements the Maya wave noise texture type.

    In addition to implementing the dependency node, this plug-in also shows a complete implementation of a texture shader for Viewport 2.0.

    It demonstrates how to define and register shading fragments to create a final fragment graph and associate it with the dependency node. In addition, this example also demonstrates how to create and access the noise lookup table that Maya uses for computing procedural textures.

    The primary shading fragment defines a texture and sampler parameter pair for the noise lookup table. The noise lookup table is then used to build a 3d texture that the pixel shader can sample to compute the final ‘wave’ noise result. New MRenderUtil methods: noiseTableSize() and valueInNoiseTable() are used to access the noise lookup table values. See the simpleNoiseShader developer kit example for more information.

  • The footPrintNode developer kit example is now made simpler and demonstrates how to use MUIDrawManager to draw a simple locator in Viewport 2.0.

    Plug-in code using MUIDrawManager offers the following advantages:

    • It works with Viewport 2.0 based selection that is new for Maya 2016
    • It can be written once and used on all platforms and all draw API’s, including OpenGL core profile

    The original sample is now renamed to rawfootPrintNode which demonstrates how to draw the locator with raw OpenGL/DX calls.

    The rawfootPrintNode example has been updated to show how an M3dView can be obtained using the method MFrameContext::renderingDestination() to find the destination name, and then how M3dView::getM3dViewFromModelPanel() can be used to obtain a corresponding M3dView for a panel with the given destination name.

  • A new plug-in footPrintNode_GeometryOverride has been added that implements a locator using an MPxGeometryOverride to obtain good draw performance when a large number of locators needs to be displayed at the same time. A Python version is also available.

  • The blast2Cmd developer kit example is a new plug-in that performs video capture. It sets and overrides the output target size as well as attaches a renderer notification callback. The callback is called for each frame that the command wants to output. It uses existing interfaces to copy the render target back to a texture, and uses the built in texture saving functionality to save to disk. If the render target is fixed point, the plug-in will store the image in IFF format. Otherwise, if it is floating point, the plug-in will store it in EXR format.

    The following roughly outlines the logic used in this example:

    1. Call MRenderer::addNotification() to add in a post render callback.
    2. Call MRenderer::setOutputTargetOverrideSize() to set an override for the output target size.
    3. Queue a refresh. A render occurs to a target of the override size.
    4. The callback reads back the contents of the output target.
    5. Call MRenderer::unsetOutputTargetOverrideSize() to unset the override for the output target size.
    6. Call MRenderer::removeNotification() to remove the callback.

  • The vp2BlinnShader is a simplified example of using an MPxShaderOverride. The plug-in shows the usage of the basic interfaces for this type of override. The example uses an MShaderInstance, which is retrieved by asking the shader manager (MShaderManager) for a stock Blinn shader. As such, the geometry requirements for the shader can be retrieved from the shader instance itself. It does not require an extra DX11 shader signature in this case. The internal method for drawing is also used. There is no additional light handling required as the stock shader has its light bindings automatically updated. The plug-in can run on all platforms and all currently supported drawing APIs (OpenGL, OpenGL Core Profile, DX11), as the implementations are internally provided. Therefore, no additional shading code is required.
  • The apiMeshShape plug-in (and its Python version pyApiMeshShape.py) were updated to perform component selection in Viewport 2.0 using an MPxGeometryOverride and an MPxSubSceneOverride. They were also updated to properly manage duplicate and unknown streams, allowing it to work with effects that request multiple UV streams, or ask for binormals and bitangents.

    The SubSceneOverride version was updated to demonstrate support for DirectX11 mode. See the MVertexBuffer and MIndexBuffer Enhancements section above on this page for more information.

  • The brickShader plug-in (both C++ and Python versions) has been updated to support GLSL and therefore to run in OpenGL Core Profile mode in the Maya viewport. The shader fragment for GLSL was written based on the HLSL implementation.
  • The viewOverrideSimple sample plug-in has been added that demonstrates how to use MRenderOverride, and is a simple example targeted towards beginners. It creates a render override that is listed as a renderer in the viewport menu, and it draws the scene and the HUD, and performs a background color override. The logic used in the sample to create the render override roughly matches that used in Maya’s internal render pipeline.
  • In order to compile the DX11 Shader plug-in provided in the developer kit using Visual Studio 2012, you must first compile the Microsoft DirectX SDK Effects11 library using the Visual Studio 2012 project file (Effects11_vs2012.vcxproj) provided in the devkit/plug-ins/dx11Shader folder by doing the following:

    1. Copy the file to the Effects11 folder (in most cases: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Effects11).
    2. Load the Effects11_vs2012.vcxproj project file and compile the solution from the Effects11 folder.

Documentation updates



  • Added new MEvaluationManager class that allows you to query Evaluation Manager states. The simpleEvaluationNode developer kit example demonstrates its use.
  • Added new preEvaluation() and postEvaluation() virtual methods to MPxNode
  • Added new MEvaluationNode class to provide access to the set of attributes and plugs that will be set dirty prior to evaluation by the Evaluation Manager.
  • Added new MEvaluationNodeIterator class that is used by MPxNode::preEvaluation() and MPxNode::postEvaluation() for support of threaded evaluation. This class is used to easily iterate over the set of attributes and plugs that will be set dirty prior to evaluation by the Evaluation Manager on a given MEvaluationNode.
  • Added developer kit example simpleEvaluationNode that shows use of preEvaluation() function
  • Added developer kit example simpleEvaluationDraw that shows use of postEvaluation() function
  • Plug-ins can now provide hints to the evaluation manager as to how they should be scheduled.

    Scheduling of python plug-ins is now improved. Previously, Python nodes were run in parallel which could cause issues with lock contention, slowing down evaluation.

    Python plug-ins are now globally serialized, avoiding issues with the GIL (global interpreter lock), and improving overall performance.

    To provide scheduling of plug-in nodes, the following new enum and virtual method have been added to MPxNode. They are as follows:

    • ::SchedulingType
    • Users can override the MPxNode::schedulingType() const function, which returns the desired scheduling type for the node.

Added the following new classes to support GPU override deformers:

  • Added new MFnMatrixArrayData class that allows your plug-ins to use MMatrixArray attribute types. This can be used to generate more compact graphs instead of creating multis of MMatrix types. One immediate use of this type is to read cached frame information computed by the new DeltaMush deformer.


A new MPxMotionPathNode class has been added, and is the base class for user defined motionPath nodes. It allows you to create your own motion path classes by providing methods that specify how the position, orientation and other attributes of connected nodes transform based on the position along the path. You can follow either of these workflows to use the MPxMotionPathNode class:

  • Access the motionPath engine via à-la-carte functions such as position(), getVectors() and banking() to compute your solution.
  • Use the evaluatePath() function to invoke the internal motionPath engine based on a predefined set of parameters that you set.

The advantage of MPxMotionPathNode over the built-in motionPath node is the ability to control how calculations are performed. Here are some examples of how you can create effects using the MPxMotionPathNode node:

  • Change how the range is interpreted, such as setting 0 at the start and 100 at the end of the path regardless of the underlying curve parameterization. Implement a wraparound when the parameter goes outside the range of the path, change the duration, implement cycling or add an oscillation effect. You can implement all of these simply by remapping the parameter value.
  • Enable your geometry to anticipate each corner by leaning into the curve. The banking calculation on the motionPath node is computed at the current location on the path, but with the MPxMotionPathNode node and its à-la-carte approach, you can easily call the banking() function on a position somewhere ahead of the current location.
  • Offset the result to a space away from the path curve by adding a translation along the computed vectors. This could be used to give a slalom effect to a skier moving along a simple path. You could even add banking based on the slalom path rather than the actual path curve.
  • Attach multiple outputs to the same custom motionPath node by creating a multi for your inputs and a multi for the outputs. To simulate multiple skiers in a line following the same path, simply specify a different relative offset along the path for each skier. To simulate a platoon of soldiers marching in a parade that turn corners smartly, specify offsets both along the path as well as horizontally.

    See the motionPathNode developer kit example for an example of how to use the MPxMotionPathNode class to create sophisticated path animation effects.


MPxAnimCurveInterpolator is a new class that you can derive from to create user-defined animation curve interpolation types. It dictates how an animation curve evaluates between two keyframes.


Added the following new classes to support GPU override deformers:

Deformer classes have been re-organized. New classes:

  • MPxGeometryFilter - the new base class for deformers. This is equivalent to MPxDeformerNode (which still exists), but without per-vertex weight lists.
  • MPxSkinCluster - extends MPxGeometryFilter with per-vertex skin weights. Custom nodes derived from this class are treated like the built-in skinCluster in the Maya UI.
  • MPxBlendShape - extends MPxGeometryFilter with the input target. Custom nodes derived from this class are treated like the built-in blendShape in the Maya UI.


  • A new MGraphEditorInfo class has been added that allows you to query, for a given Graph Editor, UI information such as viewport bounds and animation curve nodes based on its current state.

Developer Kit examples

  • identityNode: This example illustrates a simple possible deformer that copies inputs to outputs. It also provides a boilerplate that allows you get started on creating your own deformer.
  • offsetNode: This example provides the CPU and GPU implementation of a non-trivial deformer.
  • basicBlendShape: This example illustrates creating a basic deformer by inheriting from MPxBlendShape.
  • basicSkinCluster: This example illustrates creating a basic deformer by inheriting from MPxSkinCluster.



MPolyMessage enhancements:

  • Added new MPolyMessage::addUVSetChangedCallback() method to register callbacks for UV set modification messages, including notifications for adding and deleting of a UV set, as well as the switching of the current UV set.

MFnMesh enhancements

  • Added a method MFnMesh::setPinUVs() to set the specified UVs of the mesh as pinned UVs. A pinned UV is one which should not be modified. If the pin weight is set to 1.0, then it becomes fully pinned and UV tools should not modify that UV. If the pin weight is set to a value between 0.0 and 1.0, then UV tools should weigh their changes to that pin weight accordingly.
  • Added a method MFnMesh::getPinUVs() to get the pinned UVs of the mesh, as well as the pin weights associated with those UVs.

  • Added thickness and offset options to the MFnMesh::extrudeFaces() and MFnMesh::extrudeEdges() functions. These parameters map directly to the attributes on the extrude face and edge nodes.


New context proxy class

  • Added new MPxTexContext context proxy class. This context proxy class provides a way to extend the function of the UV Texture Editor with user defined tools. Several functions for handling interactive events such as: mouse move, mouse press, mouse drag and mouse release are provided. You can override these functions to define the behavior of the new interactive tools for the UV Texture Editor.
  • Added new Qt sample plug-in grabUV.pro, which demonstrates how to use MPxTexContext to implement a UV grab brush.

New command proxy class

  • Added new MPxPolyTweakUVInteractiveCommand command proxy class. This tool command proxy class provides a simplified way to interactively edit UVs on polygonal objects within interactive contexts. A user can provide new UVs during an interactive command, and by finalizing the editing, all interactive updates are recorded as a single command, and can be undone together.

MPxContext Enhancements

  • Added new MPxContext::drawFeedback() method to draw primitives using MUIDrawManager in Viewport 2.0 when the context tool is activated. This is useful for rendering context feedback, such as a brush ring.


When you instrument a procedure using MProfilingScope, you can also register an associated DG node. This way, when you select an instrumented event in your Profiler graph, its associated DG node is also selected and displayed in the Attribute Editor, Outliner or Node Editor.

MProfilingScope::MProfilingScope() now accepts an optional input parameter: an MObject that points to the associated node of the procedure being instrumented.

The MObject input parameter must point to a DG node and cannot point to an attribute or a component.

Example as follows:

import maya.OpenMaya as OpenMaya
import maya.cmds as cmds

testCategoryIndex = cmds.profiler(addCategory = "testCategory")

def associatedNode():
    # Create a cone
    myCone = cmds.polyCone()
    mSelList = OpenMaya.MSelectionList()
    OpenMaya.MGlobal.getActiveSelectionList( mSelList)
    # Prepare the MObject to point to the cone.
    coneObj = OpenMaya.MObject()
    mSelList.getDependNode(0, coneObj)

    # Instrument the procedure and register its associated DG node; that is the cone node that was just created.
    profiler = OpenMaya.MProfilingScope(testCategoryIndex, OpenMaya.MProfiler.kColorE_L1, "associatedNode", "associatedNodeDesc", coneObj)
    cmds.select( myCone[0] )
    cmds.rotate( '45deg', 0, 0, r=True )

cmds.profiler(sampling = True)
cmds.profiler(sampling = False)

64-bit integer support

The Maya C++ API now supports 64-bit integers. The following interfaces have been added:



Universally Unique Identifiers (UUID's) for nodes

Python equivalent to MDGModifier::commandToExecute() added

A new MDGModifier::pythonCommandToExecute() has been added that allows you to add an operation that executes a Python command/script to a dependency graph modifier.

This is the Python equivalent of the method MDGModifier::commandToExecute().

Removed classes

The obsolete classic cloth MCloth classes have been removed.


MPxShaderOverride non-virtual protected methods are now exposed in the .NET API, and you can use them to render your materials in Viewport 2.0: