What's New in API in Maya 2017

API version and binary compatibility

Maya's API version has been updated (MAYA_API_VERSION is now 201700). Note that all plug-ins compiled against Maya 2016, including Maya 2016 Extension 1, 2 or service pack releases, must be re-compiled against Maya 2017 in order to be recognized by this version of Maya.

New Qt and PySide versions

Maya now uses Qt version 5.6.1 and PySide version 2.0.

See Building the plug-in for updated instructions on how to build Qt plug-ins.

Maya Developer Kit

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

Maya 2016 API Guides

The Maya 2016 Extension 2 API Guide is available online at http://www.autodesk.com/maya-sdkdoc-2016-enu. You can also obtain a downloadable version at http://www.autodesk.com/me-sdk-docs-2016.

The downloadable version of the Maya 2016 and Maya 2016 Extension 1 API Guide is available at http://www.autodesk.com/me-sdk-docs-2016.

Jump to the following sections:

Rendering

Fragment renderer

A viewRenderOverrideFromFragments example plug-in has been added which demonstrates the use of a set of new APIs that allow you to use scripted fragment and fragment graphs to render the scene and any desired post effects. Script fragments are the building blocks used internally by Maya for standard viewport rendering effects, and are located in a series of .xml files in the bin/ScriptFragment folder of your Maya installation directory.

The following API classes and interfaces have been added to enable you to create a fragment renderer:

See Write fragments and fragment graphs to render to the viewport.

Locators

Drawing

Shading and color management

Selection

Render overrides

Lights

It is now possible to combine a custom draw override with internal Viewport 2.0 lighting support by specifying both a "drawdb/light" and a "drawdb/geometry" classification when registering a node.

A sample use case is to draw a custom object in the viewport that performs lighting in Viewport 2.0 as a native Maya light would. See the apiDirectionalLightShape plug-in example and Registration for more information.

Geometry

The access of vertex ids, face ids and local parameterization is now exposed via the MGeometryExtractor interface. To extract completely unshared geometric data from a DAG shape, kPolyGeom_NotSharing needs to be specified when constructing an MGeometryExtractor instance.

Similar to MPxShaderOverride, there is no new interface on MGeometryExtractor that requests vertex ids, face ids or local parameterization. Instead MVertexBufferDescriptor should be specified with the following semantic names to populate these vertex buffers:

Refer to the geometryReplicator plug-in example for more information. To execute this plug-in example, first set the following environment variables, then assign a hwPhongShader to the geometryReplicator shape.

See Viewport 2.0: MGeometryExtractor access.

Animation

Custom evaluators

New API extensions have been added that let you define custom evaluators. Custom evaluators allow you to override how DG nodes are scheduled and executed by the evaluation manager. See Custom evaluator overview. See also MPxCustomEvaluator and the simpleEvaluator and constraintEvaluator plug-in examples in the Developer Kit.

Threading

Scene Assembly

A new MPxAssembly::postActivateRep() virtual function has been added that provides the assembly with an opportunity to perform operations on it after the representation has been activated.

General

Maya Viewport 2.0 and animation performance whitepapers

The Maya Viewport 2.0 whitepaper can be found at http://www.autodesk.com/developmaya.

This document is divided into two parts. The first (Viewport 2.0 API Porting Guide) is an overview of Viewport 2.0 and outlines the differences between the legacy default viewport and Viewport 2.0. The second part (Viewport 2.0 API Porting Guide Details) is more detailed and specifies the recommended interfaces and provides code examples for common tasks.

The Improving Performance with Parallel Evaluation whitepaper can be found at http://www.autodesk.com/maya-docs.

Refer to this document for information on how to use the new Evaluation Manager feature to improve playback and manipulation of your animated scenes through scene-level graph analysis and parallelization. In addition, it provides information on the API extensions that your plug-in can implement to take advantage of these features, as well as guidelines on how to use the Profiler to evaluate performance in your scene.