The guide is based on What’s New in the Maya Devkit in Maya 2023 with some extra info. For more details including commands and scripts changes, please checkout the documentation for more details.
Our Maya documentation team is also interested to know how impactful Developer documentation improvements have been over the past few releases. If you have a moment, please take this short survey to help us improve and know what is most important for you.
The building environment remains unchanged.
|Windows||Windows 10 x64||Visual Studio 2019.7.8
Windows SDK Version 10.0.10586.0
|Mac||Mojave 10.14.x||XCode 10.2.1|
|Linux||CentOS/RHEL 7.x(x>=6)||gcc 9.3.1 (DTS 9.1)|
- Alembic libraries have moved, using the find_alembic macro in your CMakeLists.txt files.
- Devkit examples now require cmake version 3.13 or later to compile.
- The py1ArrayAttrBlenderNode.py example has been added to demonstrate how to implement array attributes in a straightforward way.
- The py1MoveTool.py example has been updated from using VP1 to using VP2, and updated to use Python API 2.0. It has been renamed to py2MoveTool.py.
- The customImagePlane example has been updated to fix an issue where images were not animated when scrubbing.
- The gpuCache example has been updated to use the new kSelectionHighlighting enum.
- The rockingTransform example has been updated to use the new preRotation() method in MPxTransformationMatrix.
- The offsetNode example has been updated to use the new GPU deformer API.
- The apiMeshShape example has been updated to remove deprecated code and to fix a bug in the example.
Python has been updated to 3.9 from 3.7. Code compatibility is not guaranteed between these two version and you may encounter issues when porting your scripts from Python 3.7 to Python 3.9. There are several deprecated methods removed in Python 3.9. Consult What’s New in Python 3.8 and What’s New in Python 3.9 for details.
The ABI is not compatible between these 2 versions neither. Depending on which method is used (pybind11, swig, boost.python or CPython), it is necessary to review and recompile Python extensions.
PySide is now also built with Python 3.9.
Back to top
Maya will use a site-packages directory specific to its release version.
|Operating system||Path to new site-packages location|
This is an added directory. Packages will not be moved to this directory, and this directory will not replace any existing directories. However, packages in this directory will be prioritized over Maya’s own site-packages directory.
Use the pip —target option to install packages to this location:
mayapy -m pip install <package_name> --target <full_path_to_maya_2023_site-packages>
pyside2-uic and pyside2-rcc are now included with Maya.
Users can now use pyside2-uic to generate Python code from .ui files.
The Python counterparts of the following C++ methods have been added to the Python API 2.0:
virtual void MPxNode::getCacheSetup(const MEvaluationNode&, MNodeCacheDisablingInfo&, MNodeCacheSetupInfo&, MObjectArray&) const virtual void MPxNode::configCache(const MEvaluationNode&, MCacheSchema&) const virtual MTimeRange MPxNode::transformInvalidationRange(const MPlug& source, const MTimeRange& input) const bool MPxNode::hasInvalidationRangeTransformation() const virtual void MPxGeometryOverride::configCache(const MEvaluationNode&, MCacheSchema&) const
One new method has been added to MGPUDeformerRegistrationInfo:
virtual bool isGeometryFilter() const
And four new methods have been added to MPxGPUDeformer:
static bool isBufferUpdateNeeded(const MOpenCLBuffer& buffer, const MEvaluationNode& evaluationNode, const MObject& attribute) cl_int uploadFixedSetupData(const MString& name, MOpenCLBuffer& buffer, cl_int& errorCode, unsigned int* arrayLength) static MFnGeometryData::SubsetState getSubsetState(MDataBlock& block, unsigned int multiIndex, MStatus* ReturnStatus = NULL) static const char* className()
The offsetNode example has been updated to use these new classes and methods.
Two new methods, MColorPickerUtilities::applyViewTransform(), and MColorPickerUtilities::grabColor() and a new class MColorMixingSpaceHelper, have been added for creating a color managed color picker using the API.
MColorPickerUtilities::applyViewTransform (const MColor &inputColor, Direction direction) MColor MColorPickerUtilities::grabColor(MStatus * returnedStatus = nullptr)
Three new methods have been added to MGlobal:
static bool initOptionVar(const MString& name, int value, const MString& category) static bool initOptionVar(const MString& name, double value, const MString& category) static bool initOptionVar(const MString& name, MString value, const MString& category)
MTimeSliderCustomDrawManager class has been added to the Maya API. This class provides a way to draw custom items on the timeline.
Three callback methods were added:
void setStopPrimitiveEditFunction(MCustomDrawID id, MSharedPtr< MStopPrimitiveEditingFct > fct) void setStartPrimitiveEditFunction(MCustomDrawID id, MSharedPtr< MStartPrimitiveEditingFct > fct) void setEditPrimitiveFunction(MCustomDrawID id, MSharedPtr< MEditPrimitiveFct > fct)
The three abstract classes, MStopPrimitiveEditingFct, MStartPrimitiveEditingFct, and MEditPrimitiveFct, were added to support these callbacks.
Three new selection levels have been added to the MIntersection::SelectionLevel() and MSelectionContext::SelectionLevel in OpenMayaRender
kFace, kEdge, kVertex were added. Plug-ins that test the selection level of a selection hit against the kComponent level should be updated to test against the three new levels instead.
reset() methods in MItMeshPolygon, MItMeshEdge, and MItMeshVertex have been modified to remove invalid component IDs automatically
The rockingTransform example has been modified to use this new functionality.
The gpuCache devkit example has been updated to use this new enum.
Two new parameters, inputColorSpace and alphaDiscardThreshold have been added to MUIDrawManager::setTexture()
inputColorSpace is the color space of the texture that will be used to create a shader override when converting texture color to render space color.
alphaDiscardThreshold controls the shader that draws textured UI objects. Any parts of the texture that have an alpha value lower than the threshold will not be drawn. A threshold of 0.0 means everything will be drawn while 1.0 means nothing will be.
DefaultMaterialFiltering, setDefaultMaterialHandling(), and getDefaultMaterialHandling() were added so that a MRenderItem can be filtered based on the default material setting of the viewport.
A new enum and three new methods have been added to MHWRender::MRenderItem.