What's New in the General and Modeling API

General

New Python workspace controls devkit example

A new dockableWorkspaceWidget.py example demonstrates how to create workspace controls using Python. Access the example in the pythonScripts directory of the Maya devkit.

For more information, see Writing Workspace controls.

MDataBlock and MDataHandle enhancements

The MDataHandle class is now declared a friend of the MDataBlock class.

Added the MDataHandle::datablock() method to the MDataHandle class. This method returns the datablock associated with the current data handle.

MFnContainerNode additions

Added new methods to the MFnContainerNode class. These methods are also available for Python API 2.0.

MQtUtil additions

Added new static methods to the MQtUtil class to provide better support for Maya user interface elements in HiDPI displays. The new methods locate UI elements (pixel maps, cursors, and icons) first in the Qt resources, and then in a file on disk. Next, they return the UI element with the given name. If the autoScale parameter is set to true, the UI element with the appropriate DPI is selected. See the following methods:

Other general API updates

Modeling

OpenMaya

MFnMesh enhancements:

  • Added the MFnMesh::intersectFaceAtUV() method, which returns the ID of the intersected face at a given UV set and coordinates. If multiple faces are intersected, the first intersected face is returned.