Maya 2019 release has been released now. Here is a guide based on What's New in API in Maya 2019 with some extra info.
For more details, please check our documents here.
Build environment:
Windows and MacOSX remain unchanged. Linux is updated to CentOS/RHEL 7.x(x>=2) and using gcc 6.3.1 from DTS 6.1
Platform | OS | Compiler |
---|---|---|
Windows | Windows 7 x64 | Visual Studio 2015 Update 3 Windows SDK Version 10.0.10586.0 |
Mac | El Capitan 10.11.6 | XCode 7.3.1 |
Linux | CentOS/RHEL 7.x(x>=2) | gcc 6.3.1(DTS 6.1) |
Important: Maya sets the SSL_CERT_FILE environment variable to point to the cert.pem file within its embedded Python Framework if SSL_CERT_FILE is unset.
If you need SSL_CERT_FILE to remain unset because you are using other means of controlling Python's certificate usage, set MAYA_DO_NOT_SET_SSL_CERT_FILE before launching Maya:
export MAYA_DO_NOT_SET_SSL_CERT_FILE=1
Devkit updates
-
Devkit samples of Maya 2019 use CMake to generate makefiles/solutions.
-
Added a new geometryOverrideExample1/geometryOverrideExample1.cpp example plug-in, which demonstrates how to render geometry with a stock shader.
-
Added a new geometryOverrideExample2/geometryOverrideExample2.cpp example plug-in, which demonstrates how render geometry with a Maya shader network.
-
Added a new geometryOverrideHighPerformance/geometryOverrideHighPerformance example, which demonstrates how to use MPxGeometryOverride to render geometry with the best performance as possible.
-
Added a new footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp example plug-in to make it fully compatible with Evaluation Caching.
-
Added a new footPrintNode_GeometryOverride_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp example, which demonstrates how to draw a simple mesh like foot Print in an efficient way.
-
Added a new nameFilter/NameFilter.cpp example, which demonstrates how to create custom configuration rule filters with new API
-
Added a new testMTopologyEvaluator/testMTopologyEvaluator.cpp example, which demonstrates the features of topology evaluators.
-
Added a new topologyTrackingNode/topologyTrackingNode.cpp example, which demonstrates the use of the new version of the attributeAffects() relationship which can take a parameter specifying whether or not the relationship affects topology.
-
A number of devkit examples have been updated to remove deprecated methods.
-
An updated captureViewRenderCmd/captureViewRenderCmd.cpp devkit example now shows how to disable the output transform in Viewport 2.0 using the MRenderer::render() API.
-
Add a guide for cmake in readme.md
-
libOpenMayalib.a is removed in Linux.
-
Added a new tessellatedQuad example plug-in to the Maya devkit. The example demonstrates how to implement custom selection shader for kPatch render items in a MPxGeometryOverride. It also shows how to share geometry/index streams among several render items to avoid expensive recalculation.
Samples removed from devkit/plug-ins
Cg(moved to headers)
blastCmd
curvedArrowsNode
D3DViewportRender
D3DViewportRenderer
DX11ViewportRenderer
GL
hwAnisotropicShader_NV20
hwColorPerVertexShader
hwDecalBumpShader_NV20
hwReflectBumpShader_NV20
hwRefractReflectShader_NV20
hwToonShader_NV20
hwUnlitShader
OpenGLViewportRender
pnTriangles
quadricShapes
selectClosestPointLocator
ShapeMonitor
Headers removed from devkit
d3dx11effect.h
d3dxGlobal.h
New headers included
libxml
Universal Front End
- Universal Front End is to create a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models.
The initial data model targets to be supported are the Maya DG, Bifrost, and USD.
API Updates in Maya 2019
Rendering and Lighting
MRenderItem class updates
When a 3D model view activates Isolate Select for components, Viewport 2.0 creates and maintains necessary render items to represent the drawing of the isolate selected components specifically for that view. These render items are copies of their original items and so they have the same properties including name, type, primitive type, and draw mode. However, their shading components are filtered from the view selected set of that view.
New methods have been added to allow custom render items created in a MPxGeometryOverride implementation to have their copies created for the drawing of isolate selected components. They also provide access of the view-selected shading components so that the MPxGeometryOverride implementation can fill in geometries properly.
These new methods include:
MRenderItem::shadingComponent()
MRenderItem::setAllowIsolateSelectCopy()
MRenderItem::allowIsolateSelectCopy()
MRenderItem::isIsolateSelectCopy()
The apiMeshShape example plug-in has been updated to use these new methods, and the Python API also includes these changes.
MSelectionInfo class updates
The mask argument has changed from a non-const reference to const reference for the following methods:
- MSelectionInfo::selectable()
- MSelectionInfo::selectableComponent()
MPxGeometryOverride class updates
Updates to the both C++/Python MPxGeometryOverride class include the following new methods:
- MPxGeometryOverride::requiresGeometryUpdate(), which determines if other MPxGeometryOverride methods get called for the associated DAG object during the draw preparation phase.
- MPxGeometryOverride::requiresUpdateRenderItems(), which gets called when an instance of a DAG object changes to determine whether MPxGeometryOverride::updateRenderItems() needs to be called.
- MPxGeometryOverride::supportsEvaluationManagerParallelUpdate(), which gets called to determine if the scene is supported by the Evaluation Manager Parallel Update.
- MPxGeometryOverride::supportsVP2CustomCaching(), which gets called during evaluation to determine if VP2 Custom Caching is supported.
MPxDrawOverride class updates
A new MPxDrawOverride::pointSnappingActive() method allows a draw override to query whether snapping to points is active.
A new MPxDrawOverride::userSelect() interface. It allows for adding a list of DAG paths/components and world space hit points.
MShaderManager class updates
A new MShaderManager::getArraySize method. It returns array size of the given parameter.
MRenderItem Updates
You can now control consolidation per-object to MPxGeometryOverride. The following new methods have been added to let you control whether render items participate in consolidation:
MRenderItem::setWantConsolidation()
MRenderItem::wantConsolidation()
This change also deprecates the following methods:
MRenderItem::setWantSubSceneConsolidation()
MRenderItem::wantSubSceneConsolidation()
The footPrintNode_SubSceneOverride example plug-in has been updated to use these new methods.
New MColorManagementNodes class updates
The MColorManagementNodes C++ API class has been added that allows you to manipulate color managed nodes; for example: you can color manage one or all input nodes, and query whether an object is color manageable or color managed. A colorManageAllNodes flag has also been added to the colorManagementPrefs MEL/Python command.
Evaluation and Performance
New class MPxTopologyEvaluator
The new class allows topology override of evaluation graph. This makes possible to have total control over granularity, leverage already existing scheduling constraints and scheduling graph. Supports partial evaluation for minimal evaluation of cluster content. Finally, allows better resource utilization since execution of cluster content doesn’t have to wait for entire upstream to start and downstream can start as soon as dependencies are ready (sort of transparent clusters, but much more configurable and with no constraints on granularity).
MFnDependencyNode class updates
New methods added to the MFnDependencyNode class let you set and manage which nodes have permission to be scheduled for evaluation by the evaluation graph. Nodes that do not have permission for evaluation can be created and destroyed without invalidating the evaluation graph.The Python API also includes these new methods.
- MFnDependencyNode::setAllowedToAnimate(), sets whether or not a node has permission to be added to the evaluation graph for scheduling during playback or manipulation. Nodes without permission, cannot be added to the evaluation graph.
- MFnDependencyNode::allowedToAnimate() indicates whether or not the node has permission for evaluation based on MFnDependencyNode::setAllowedToAnimate().
MGraphEditorInfo class updates
Added the following new methods to the MGraphEditorInfo class:
- MGraphEditorInfo::isStackedViewportMode(), which returns whether or not the Graph Editor is in Stacked View mode.
- MGraphEditorInfo::isNormalizedViewportMode(), which returns whether or not the Graph Editor is in Normalized View mode.
MProfiler class updates
- New versions of the MProfiler::addCategory() and MProfiler::getAllCategories() methods now use a categoryInfo parameter in addition to the previous accepted parameters. Previous versions of these methods have been deprecated.
- A new MProfiler::getCategoryInfo() method returns the profiling category description.
MPxNode class updates
- Add two methods for controlling topology dirtying
MPxNode::isTrackingTopology
MPxNode::attributeAffects
New MPxCacheConfigRuleFilter and MCacheConfigRuleRegistry classes
A new MPxCacheConfigRuleFilter class lets you define custom configuration rule filters for background evaluation caching. The new class includes the following methods:
- MPxCacheConfigRuleFilter::preRulesExecution(), which is called when the cache configuration rule application starts.
- MPxCacheConfigRuleFilter::postRulesExecution(), which is called when the cache configuration rule application stops.
- MPxCacheConfigRuleFilter::isMatch(), which gets called for each evaluation node when filter rules are applied for the cache configuration.
A new MCacheConfigRuleRegistry class includes a static method for registering and deregistering MPxCacheConfigRuleFilter custom classes.
A new nameFilter/NameFilter.cpp example demonstrates how to create custom configuration rule filters.
General and Modeling
MUIDrawManager class updates
Updates to the MUIDrawManager include the following:
-
New cylinder and capsule primitive extension methods:
- MUIDrawManager::cylinder()
- MUIDrawManager::capsule()
-
New parametric primitive methods now let you define the number of subdivisions for primitives:
- MUIDrawManager::sphere()
- MUIDrawManager::circle()
- MUIDrawManager::circle2d()
- MUIDrawManager::arc()
- MUIDrawManager::arc2d()
- MUIDrawManager::cone()
The Python API also includes these methods. Updates to the uiDrawManager example plug-in in the Maya devkit include the new methods.
New MCameraMessage class
A new MCameraMessage class lets you register callbacks for interactive camera manipulation messages. To remove a callback use MMessage::removeCallback(). Note that all callbacks registered by a plug-in must be removed by that plug-in when it is unloaded. Failure to do so will result in a fatal error. The Python API has also been updated with these new methods.
A new cameraMessageCmd/cameraMessageCmd.cpp plug-in example demonstrates how to use each of the new camera manipulation callbacks.
MFnMesh class updates
A new version of the MFnMesh::create() method now stores vertices in doubles and allows edge connections.
The OpenMaya.MFnMesh.create () method in the Python API has also been updated with this improvement.
MFn class updates
Added new kPinToGeometryUV, kPinToGeometryProx and kUfeProxyTransform enums.
Note, kPinToGeometryUV and kPinToGeometryProx are fater kClosestPointOnMesh. If you are using numbers directly instead of enum, it may cause problem.
MPolyMessage class updates
Added the MPolyMessage::addColorSetChangedCallback() method to register a callback when ColorSetChanged is modified.
Added the following new enums to specify the type of color set change message:
- kColorSetAdded when a new color set gets added.
- kColorSetDeleted when a color set gets deleted.
- kCurrentColorSetChanged when the current color set gets changed.
The Python API has also been updated to include these changes.
MGlobal class updates
Updates to the MGlobal class include the addition of the MGlobal::executeTaskOnIdle() method. Use this method to execute a customized task to execute on the next idle event. This is a thread safe way to schedule a task for the main thread to execute. This method is not available in Python.
Add a new method MGlobal::customVersion.
MMessage class updates
Added the MMessage::stopRegisteringCallableScript() method. Use this method to stop the MMessage object from being passed.
Other API updates
- Added a new kAfterCreateReference enum to the MSceneMessage class for Python. The enum provides support for MSceneMessage.addReferenceCallback().
- Added a new MColorPickerUtilities class, which lets you create a color picker that can grab colors from third-party plugins.
- Added a new callback MPxIkSolverNode::isAttributeCreatedBySolver. It returns whether a certain attribute on the ikHandle was created by the solver (and affecting the result of the solve).
- Added a new class MArrayIteratorTemplate. It enables iterators for Maya array classes.
- Added a new method MFnAnimCurve::insertKey
- The MnCloth::setAddCrossLinks() method now uses a boolean instead of a float value.
- doubleBuffered is renamed to softwareStaged in MVertexBuffer and MIndexBuffer. When using MVertexBuffer/MIndexBuffer in conjunction with Evaluation Manager Parallel Update in MPxGeometryOverride the buffer used must be software staged.
- In Maya 2019, we changed the deprecation mechanism for several methods. These methods have already been marked as being obsolete in the documentation for several years but now they will generate warnings at the compilation time. The documentation usually explains which alternate method to use. In the meantime the warning/error can be disabled by using the _OPENMAYA_DEPRECATION_PUSH_AND_DISABLE_WARNING and _OPENMAYA_POP_WARNING macros.
Thanks for the information!
I tried to build some native .bundle maya plugins, but all the .xcodeproj files are removed from the devkit/plug-ins?
The problem is, in Maya2018, the .xcodeproj file defines some link flags like:
-Wl,-exported_symbol,__Z16initializePluginN8Autodesk4Maya16OpenMaya201800007MObjectE
-Wl,-exported_symbol,__Z18uninitializePluginN8Autodesk4Maya16OpenMaya201800007MObjectE
How am I supposed to know what these values are for maya2019 plugins?
Thanks
Posted by: Miguel Gao | January 22, 2019 at 05:36 AM
Sorry, I know it is supposed to use CMakeList.
But there might be some projects already based on xcodeproj directly, so for whoever need the symbol names for Maya2019:
__Z16initializePluginN8Autodesk4Maya16OpenMaya201900007MObjectE
__Z18uninitializePluginN8Autodesk4Maya16OpenMaya201900007MObjectE
Posted by: Miguel Gao | January 22, 2019 at 02:59 PM