What's New in the Maya 2020 devkit

The following changes have been made to the Maya devkit in this release.

New minimum versions

The Maya 2020 devkit now requires Visual Studio 2017 and Xcode 10.2.1.

The requirements for Linux remain unchanged.

Fixed feature

Previously MPxTransform::boundingBox() was not being called when isBounded() was implemented and returned true.

This has been fixed, and MPxTransform::boundingBox() is now called when iBounded() is implemented and returns true. It will not be called when isBounded() returns false, or when isBounded() is not implemented.

Cached Playback

New classes have been added to support the Cached Playback feature:

New methods have been added to support Cached Playback

ADSK Standard Surface shader

A new surface shader, the ADSK Standard Surface shader, has been added to Maya.

Changes have been made to the API to support this new shader.

The MFnStandardSurfaceShader class has been added to the C++ and Python 1.0 APIs. This class provides access to the attributes of the standardSurface shader node.

The MFn.kStandardSurface type is used to determine whether an MObject supports the new default shader. MFn.kStandardSurface is available in the C++, Python 1.0, and Python 2.0 API.

In the Viewport 2.0 API, the new standard shader, k3dStandardSurfaceShader, has been added to MStockShader. MShaderManager::getStockShader() can use k3dStandardSurfaceShader as its first argument. MShaderInstance::addInputFragmentForMultiParams() adds support for connecting multiple parameters from an registered input fragment to an existing MShaderInstance.

Graph Editor overlay drawing

A new feature has been added that allows users to draw primitives over the Graph Editor.

Two new classes have been added to the C++ and Python APIs: MPanelCanvas and MPanelCanvasInfo classes.

Other new Python classes and methods

The following classes have been added to the Python API 2.0:

The following classes have been added to the Python API 2.0:

Other new classes

MGPUEventList has been added to manage event wait lists.

MIndexMapper has been added to map indices between a geometry and a subset of indices affected by a deformer.

New iterator method added to MItGeometry

MItGeometry::positionIndex() has been added to help with iterating over surface geometries.

New methods for selection pass rendering

MPxSubSceneOverride::enableUpdateForSelection() and MFrameContext::getSelectionInfo() have been added to help with selection pass updating.

MPxSubSceneOverride::enableUpdateForSelection() is called by Maya when a subscene is created. It returns false by default, meaning that update methods will only be called for regular renders.

Overriding this method to return true causes update methods to also be called for selection passes.

MFrameContext::getSelectionInfo() returns the selection state information if it is called in a selection pass, and returns a null pointer otherwise.

The apiMeshSubSceneOverride example has been updated to use both these methods.

Changes to MFnPlugin::registerEvaluator()

The signature for registerEvaluator() has changed from

MFnPlugin::registerEvaluator(const MString& evaluatorName, unsigned int  uniquePriority, MCreatorFunction creatorFunction)

to

MFnPlugin::registerEvaluator(const MString& evaluatorName, unsigned int  uniquePriority, MCustomEvaluatorCreatorFunction creatorFunction)

Changes to MPxNode::configCache()

The signature of configCache() has changed from

MPxNode::configCache(const MEvaluationNode& evalNode, const MCacheMode& info, MCacheSchema& schema)

to

Changes to MFnPlugin::registerImageFile()

The signature of MFnPlugin::registerImageFile() has changed. An ImageFilePriority parameter has been added.

The C++ signature has changed from

MStatus registerImageFile(const MString& imageFormatName, MCreatorFunction creatorFunction, 
const MStringArray& imageFileExtensions);

to

MStatus registerImageFile(const MString& imageFormatName, MCreatorFunction creatorFunction, 
const MStringArray& imageFileExtensions, ImageFilePriority priority = kImageFilePriorityDefault);

Changes to MeshIntersector

The signature of create() has been changed in the C++, Python 1.0, and Python 2.0 APIs to support faces of interest.

The C++ signature has changed from

MStatus create (MObject &meshObject, const MMatrix &matrix=MMatrix::identity)

To

MStatus create( MObject &meshObject, const MMatrix& matrix = MMatrix::identity, const MIntArray* facesOfInterest = nullptr);

Refer to the C++ and Python API references for details.

Change to MPxGeometryOverride::requireRenderItemUpdate

The default value of MPxGeometryOverride::requireRenderItemUpdate has been changed to false.

The following devkit examples have been modified to reflect this change:

Deprecated class

MPxImagePlaneOverride has been deprecated.

MPxImagePlane no longer needs to be associated with MPxImagePlaneOverride for drawing in Viewport 2.0.

Any code that uses MPxImagePlaneOverride should be updated to use only MPxImagePlane.

The customImagePlane example has been updated to remove its use of MPxImagePlaneOverride.

Added examples

simpleSimulationNode demonstrates how to interact with Cached Playback.

marqueeTool.py, lassoTool.py, and squareScaleManipContext.py demonstrate the new Python API 2.0 classes.

pyPanelCanvasInfo.py and pyPanelCanvas.py demonstrate the MPanelCanvas and MPanelCanvasInfo classes for Graph Editor overlay drawing.

Updated examples

Removed examples