What's New in API
 
 
 

New or updated API classes

M3dView

  • The MWindow and M3dWindow types have been merged into a single MNativeWindowHdl type. The applicationShell and window methods both return this new type.
  • A widget method has been added to return the QWidget associated with the view.
  • setObjectDisplay and objectDisplay methods added to set and query the types of objects displayed in the view.
  • DisplayObject enumeration expanded to include more types of objects.
  • A Mac64 version of the display method has been added which returns a void pointer to an NSOpenGLContext.
  • beginXorDrawing and endXorDrawing methods added to provide non-destructive line drawing which doesn't require hardware overlays, for things such as selection marquees.
  • usingDefaultMaterial method added to quickly determine if the view's Use default material setting is enabled.
  • Methods added to support multiple draw passes:
    • multipleDrawEnabled
    • setMultipleDrawEnable
    • multipleDrawPassCount
    • setMultipleDrawPassCount
  • beginProjMatrixOverride and endProjMatrixOverride methods added to override a view's projection matrix.
  • updateViewingParameters method added to force changes to the camera's projection and viewing matrices to be applied to the view.
  • ColorIndex mode is no longer supported so the isColorIndexMode method has been removed.

MCameraSetMessage

  • This is a new class for registering callbacks for cameraSet messages.

MDrawInfo

  • The setMultiPath method has been added to allow setting of the DAG path of the object to be drawn.

MDrawRequestQueue

  • Copy constructors have been added to allow copies of request queues to be made.

MEvent

  • The calling signatures of the setPosition and setModifiers methods have been fixed to make them accessible from Python.

MFileIO

  • getReferences method given an optional wantUnresolvedNames parameter to control whether the returned filenames should be prior to path resolution or after.
  • getFiles method added to return the names of all files in the scene. Parameters can be used to control whether only references are returned and whether resolved or unresolved names are returned.
  • Second version of getReferenceNodes added to return the nodes in an MSelectionList.

MFnCamera

  • The following methods have been added to support pan and zoom:
  • panZoomEnabled
  • setPanZoomEnabled
  • renderPanZoom
  • setRenderPanZoom
  • horizontalPan
  • setHorizontalPan
  • verticalPan
  • setVerticalPan
  • zoom
  • setZoom
  • The getFilmFrustum, getViewParameters and getViewingFrustum methods have all acquired an optional applyPanZoom parameter to control whether pan and zoom should be applied.

MFnCameraSet

  • This is a new class to create and modify camera sets.

MFnContainerNode

The following methods have been added:

  • getPublishedNames
  • getRootTransform
  • getPublishedNodes

MFnDagNode

The following methods have been made const:

  • getPath
  • getAllPaths
  • fullPathName
  • partialPathName

MFnDependencyNode

  • kGlobalDynamicAttr has been removed from the MAttrClass enum since its functionality was never implemented.

MFnDirectionalLight

  • useLightPosition and setUseLightPosition methods have been added to control whether objects positioned behind the light should cast shadows.

MFnMesh

  • setInvisibleFaces and getInvisibleFaces methods added to set and query the visibility of individual faces (for example, as per the polyHole command).

MFnNIdData

  • New class for passing Nucleus id data along connections between nodes.

MFnNObjectData

  • Support added for MnRigid and MnParticle objects.

MFnNonExtendedLight

  • More methods added for controlling depth maps:
  • depthMapFocus
  • setDepthMapFocus
  • useDepthMapAutoFocus
  • setUseDepthMapAutoFocus
  • depthMapWidthFocus
  • setDepthMapWidthFocus

MFnParticleSystem

  • setCount method added

MFnSet

  • The getMembers method now clears the selection list passed to it before adding members.

MFnSkinCluster

  • setBlendWeights and getBlendWeights methods added to set and query the skinCluster's blend weight array, which is used to blend between classical linear skinning and dual quaternion bases skinning on a per-vertex basis.
  • A version of getWeights has been added which only retrieves weights for a specified subset of the deformer's influences.

MItDependencyGraph

  • setTraversalOverWorldSpaceDependents and isTraversingOverWorldSpaceDependents methods added to support world-space attribute dependencies in the traversal.

MGeometryPrimitive

  • A copy constructor has been added.

MGeometryRequirements

  • addFaceOffsets method added to request that face offset information be included as a required element.

MMaterial

  • A new constructor has been added which takes a shader set's MObject. This allows you to instantiate MMaterials for individual components such as faces.
  • defaultMaterial method added to return the default material. This is the material used to shade scene objects when the view's Use default material setting is enabled.

MMeshSmoothOptions

  • setBoundaryRule and boundaryRule methods added to control how boundary edges and vertices are creased.

MNamespace

  • This is a new class to create and modify namespaces.

MNativeWindowHdl

  • New type definition to represent a native window handle on all platforms. This replaces M3dView::MWindow and M3dView::M3dWindow.

MnCloth

  • The following methods have been added to provide more information about the simulation:
  • getThickness
  • getInverseMass
  • getBounce
  • getFriction

MnObject

  • This new class is the base class for all Nucleus objects, such as MnCloth and MnRigid.

MnParticle

  • This is a new class to create and modify Nucleus particle objects.

MnRigid

  • This is a new class to create and modify Nucleus rigid objects.

MnSolver

  • This is a new class to create and modify Nucleus solvers.

MPlug

  • isSource and isDestination convenience methods added. It is no longer necessary to fiddle with connectedTo just to find out if you have any incoming connections.

MPx3dModelView

  • The following methods have been added to provide support for camera sets:
  • setCameraSet
  • getCameraSet
  • setCurrentCameraSetCamera
  • getCurrentCameraSetCamera
  • ColorIndex mode is no longer supported so the setColorIndexMode and isColorIndexMode methods have been removed.
  • The set parameter of the setViewSelectedSet method has been made const.

MPxCacheFormat

  • writeIntArray and readIntArray methods added.

MPxCameraSet

  • This is a new class for creating user-defined cameraSet nodes.

MPxDeformerNode

  • setDeformationDetails and getDeformationDetails methods added to control which additional components (currently just UVs and colors) the deformer will deform.

MPxFileTranslator

  • allowMultipleFileOptimization virtual method added to allow translators to specify whether they are compatible with optimizations performed by Maya when the same file is referenced multiple times.

MPxNode

  • _setDoNotWrite and _doNotWrite methods added to provide Python with access to the corresponding protected C++ methods.

MPxSurfaceShapeUI

  • surfaceShapeUI static method added to allow retrieval of a custom surface shape's MPxSurfaceShapeUI from its DAG path.

MPxTransform

  • treatAsTransform virtual method added to allow custom transform nodes to specify whether they want to be treated like normal transforms nodes or not. For example, normal transforms are not included in a viewFit operation, but joints, which are derived from transform nodes, are.

MQtUtil

  • New class providing methods to work with the Qt controls underlying Maya's UI elements.

MRenderView

  • The updatePixels method has acquired an optional isHdr parameter. When set, this parameter indicates that the pixel values are in linear CIE XYZ colorspace rather than the usual standard RGB colorspace.

MSceneMessage

  • To provide finer control over reference handling, the kBeforeReference callback has be replaced by kBeforeCreateReference, which is only called when a reference is being created, not every time it is loaded. Similarly, the kAfterReference callback has been replaced by kAfterCreateReference. The old callbacks will remain available for a couple more versions of Maya to provide time to transition plug-ins to the new ones.

MSelectionList

  • The add(const MString& matchString) method has acquired an optional searchChildNamespacesToo parameter.

MString

  • The expandEnvironmentVariablesAndTilde method has been restored to its Maya 2009 functionality, meaning that it no longer performs file-path-specific expansion on the string passed to it.
  • expandFilePath method added to perform file-path-specific expansions.

MTimerMessage

  • The addTimerCallback method has been fixed so that the callback no longer fires immediately after set but waits until the specified time period has elapsed.
  • Timer callbacks no longer require Maya to run its idle loop continuously, so the setSleepCallback and sleepCallbackPtr methods are no longer required and will be removed in a future version of Maya.

MTransformationMatrix

  • The calling signature of the reorderRotation method has been fixed so that it is now usable from Python.

MUiMessage

  • add3dViewPreMultipleDrawPassMsgCallback and add3dViewPostMultipleDrawPassMsgCallback methods added to set callbacks for the start and end of each pass when multiple draw passes are enabled. See the lensDistortionCallback plug-in for an example of their usage.

Example Plugins