What's new in the Maya 2024 devkit

Update:

There are new minimum supported versions of Linux, macOS, Xcode, Visual Studio, .NET, and CMake. See New minimum supported versions.

There are new build instructions for plug-ins built on Apple Silicon machines. See New build instructions for building plug-ins on Apple Silicon machines.

The Qt examples have been moved to dedicated directories. See Qt examples have moved.

A bug that caused MFnAnimCurve::evaluate() and MFnAnimCurve::addKey() to handle MTime incorrectly has been fixed. You will need to remove any workarounds you added to handle this bug. See Fix made to how MTime is handled by methods in MFnAnimCurve.

The apiMeshShape example has been updated to use OpenGL. Information on how to migrate from your code from using glFunctionTable to OpenGL calls is outlined in the README included in the example.

{{toc}}

 

New minimum supported versions

Operating system, compiler, or tool Minimum version
Linux RHEL 8.6 or higher, using DTS-11 with gcc 11.2.1
macOS macOS 11
Xcode 13.4
Visual Studio Visual Studio 2022
.NET 4.8.1
CMake 3.22.1

Back to top

 

New build instructions for building plug-ins on Apple Silicon machines

Maya plug-ins can be built on Apple Silicon machines

Building plug-ins in the default arm64 terminal of an Apple Silicon machine will result in arm64 binaries.

You can generate binaries for the Intel architecture by using CMAKE_OSX_ARCHITECTURES cmake option.

For example, to generate Intel86_64 binaries use:

sh cmake -H. -Bbuild -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64

And to generate binaries for both Intel86_64 and arm64 use:

 cmake -H. -Bbuild -G Xcode -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"

Back to top

Apple Silicon limitations

There are some limitations when running Maya on Apple Silicon machines.

Back to top

 

Qt examples have moved

The Qt examples packaged with the devkit have moved.

Each Qt example is now located in its own directory under the plug-ins directory:

Files New directory under plug-ins
grabUV.pro, grabUVMain.cpp, grabUVProperties.mel, grabUVValues.mel grabUV
helixQtCmd.pro, helixQtCmd.cpp, helixQtCmd.h helixQtCmd
qtAdskStyleProxy.pro, qtAdskStyleProxy.cpp, qtAdskStyleProxy.h, qtAdskStyleProxy.json qtAdskStyleProxy
qtForms.pro, qtForms.cpp, qtForms.h, qtForms.qrc, sphereForm.ui, cubeForm.ui qtForms
saveSwatchesCmd.pro, saveSwatchesCmd.cpp, saveSwatchesCmd.h saveSwatchesCmd
workspaceControlCmd.pro, workspaceControlCmd.cpp, workspaceControlCmd.h workspaceControlCmd

The qtConfig file has not been moved from the top-level plug-ins directory.

Back to top

 

Fix made to how MTime is handled by methods in MFnAnimCurve

A bug in the evaluate() and addKey() methods of MFnAnimCurve caused MTime to be handled as ticks instead of time has been fixed.

If you had any implemented any workarounds for this issue in your C++ or Python plug-ins, you will need to remove them and rebuild your plug-ins.

Back to top

Python hash support has been added to MObjectHandle

Python hash support has been added to MObjectHandle. Objects of type MObjectHandle can now be used as keys in Python containers that require hashing.

Back to top

New classes

Three new display layer classes have been added

Three new classes, MDisplayLayerMessage, MFnDisplayLayer, and MFnDisplayLayerManager, have been added to the Maya devkit.

MDisplayLayerMessage registers callbacks for display layer membership changes.

MFnDisplayLayer is the function set for querying the contents of a display layer.

MFnDisplayLayerManager is the function set used to query which display layer a Ufe item is a member of.

A new data server class has been added

A new data server class, MDataServerOperation, has been added to OpenMayaRender.

MDataServerOperation that lets you use raw renderable geometry data generated by the viewport in your own plug-ins for custom rendering.

MDataServerOperation is a technology preview of a feature that is still under development. It will change as it matures over time. If you choose to use this class in your plug-ins, make sure you check the API reference for this class at every new release of Maya.

The MayaHydra plug-in available on the public MayaUSD git repository provides an example of how this new class can be used.

Back to top

New methods

inAlternateContext() and doExitRegion() added to MPxContext

Two new methods, inAlternateContext() and doExitRegion() have been added to MPxContext.

inAlternateContext() returns true when an alternate context is active.

doExitRegion() is called when the mouse exits the viewport. This is a virtual method that must be overridden if any actions need to be taken when the mouse exits the viewport.

Back to top

indexMapper() and envelopeWeights() added to MPxDeformerNode

Two new methods, indexMapper() and envelopeWeights() have been added to MPxDeformerNode.

indexMapper() returns the indexMapper of the deformer, and envelopeWeights() returns the deformer's envelope weights, which are a combination of painted weights and falloff weights.

const float* envelopeWeights( MDataBlock& block,
                                  unsigned int multiIndex,
                                  unsigned int* numWeights);

const MIndexMapper&  indexMapper(unsigned int multiIndex, MStatus* ReturnStatus) const; 

Back to top

indexMapper() added to MPxGeometryFilter

indexMapper() has been added to MPxGeometryFilter.

const MIndexMapper& indexMapper(unsigned int multiIndex, MStatus* ReturnStatus) const;

Back to top

manipulationActive() and contextGraph() added to MEvaluationGraph

Two new methods, manipulationActive() and contextGraph(), have been added to MEvaluationGraph to access the manipulation state of the blendShape deformer.

```cpp bool manipulationActive() const;

static MEvaluationGraph contextGraph(const MDGContext &context); ```

Back to top

setOverrideBlendState() added to MUIDrawManager

A new method, setOverrideBlendState() has been added to MHWRender::MUIDrawManager.

void setOverrideBlendState (const MHWRender::MTargetBlendDesc &blendStateDesc)

setOverrideBlendState() lets you specify a new blend state to override the default blend state of the UI painter. The new blend state can be any configuration that can be set with an MTargetBlendDesc, including premultiplied alpha blending.

The overriding blend state applies to any mesh-like UI objects drawn through the draw manager, such as a mesh, line, point, circle, or sphere. It does not apply to text or icon UI objects.

Back to top

lastEvaluatedOnGPU() added to MPxGPUDeformer

A new method, lastEvaluatedOnGPU() has been added to MPxGPUDeformer.

This method returns true if the previous evaluation of this node was on the GPU.

Back to top

isExactlyEqual() added to MPlug

A new method, isExactlyEqual() has been added to MPlug.

bool isExactlyEqual (const MPlug &other) const

This method is used to compare multi-indices instead of the == and != operators.

The == and != operators cannot be used to compare multi-indices.

Back to top

balanceTransformation() added to MFnTransform

balanceTransformation() has been added to MFnTransform. This method balances a transformation when applying a world matrix to a joint.

void MFnTransform::balanceTransformation(
    MVector& localTranslate, MEulerRotation& localRotate, MVector& localScale, 
    const MTransformationMatrix& mtx, const MQuaternion& rotateAxis = MQuaternion::identity,
    const MQuaternion& jointOrient = MQuaternion::identity, 
    const bool segmentScaleCompensate = true, const MVector& inverseScale = MVector::one,
    const MEulerRotation::RotationOrder& rotateOrder = MEulerRotation::kXYZ 
)

The rebalanceTransform example has been added to illustrate the use of this new method.

Back to top

Four new methods have been added to MRenderItem

Four new methods, isHideOnPlayback(), setHideOnPlayback(),setDrawLast() and isDrawLast(), have been added to MRenderItem.

void MHWRender::MRenderItem::setHideOnPlayback(bool state)

bool MHWRender::MRenderItem::isHideOnPlayback() 

void MRenderItem::setDrawLast(bool state)

bool MRenderItem::isDrawLast()

Passing true to setHideOnPlayback() indicates that the render item should be hidden during playback. isHideOnPlayback() returns true if the render item is hidden during playback. It returns false otherwise.

Passing true to setDrawLast() indicates that the render item should be drawn after all other objects in the scene. isDrawLast() returns true if the item will be drawn last in the scene. It returns false otherwise.

Back to top

Four new methods have been added to MPxGPUStandardDeformer

Four new methods have been added to MPxGPUStandardDeformer:

unsigned int multiIndex() const;

const MPlug& inputPlug() const;

const MIndexMapper& indexMapper() const;

virtual bool passThroughWithZeroEnvelope() const;

Back to top

getDisplayStyleOfAllViewports() added to MFrameContext

A new method, getDisplayStyleOfAllViewports() has been added to MHWRender::MFrameContext. THis method returns the union of the display style of all active visible 3d viewports.

unsigned int getDisplayStyleOfAllViewports() const

Back to top

Deprecated classes

The following classes have been deprecated:

Back to top

Other API changes

Back to top

Updated examples

Update to cvColorNode

A bug in cvColorNode has been fixed. In the newest version of the example, the line

cpp cvColorData->pointArray = cvData.array(&stat);

has been replaced with

cpp cvData.copyTo(cvColorData->pointArray);

Back to top

Update to apiMeshShape

The apiMeshShape example has been updated to use OpenGL.

A README included with the example provides information on how to migrate your code to use OpenGL calls instead of glFunctionTable

Back to top

Scripting changes

Back to top

New nodes

absolute acos and asin atan atan2
average ceil clampRange cos determinant equal
floor greaterThan inverseLerp length lerp lessThan
log max min modulo multiply negate
normalize not or pi power round
rotateVector sin smoothStep sum truncate tan

Back to top