It’s been 8 years since the release of Maya Python API 2.0. While everyone liked the idea, it wasn’t well-received because it was incomplete. Autodesk has continued to work on the “new” API, but is it complete?

Should I use Maya Python API 2.0?#

When Maya Python API 2.0 was first released, I was really excited about it, but stayed away from it despite the many improvements that it brought because there were whole modules and key classes missing. Recently, when starting a new project, I was reminded of the “new” API and was curious to check on the progress on it. Most of the modules that were missing are there now, but I did notice that OpenMayaFX and OpenMayaMPx haven’t made it in yet. I put together a script to compare the classes in each of the existing modules OpenMaya, OpenMayaAnim, OpenMayaRender, and OpenMayaUI. You can find the script here if you want to check it out.

Below, you’ll find a list of the classes missing in each module. I omitted the pointer classes and MScriptUtil that I felt confident to say are deprecated now. I’m not familiar with all of these classes, but I can guess at some of them and it seems like there might be more deprecated classes in the lists bringing the parity between the two versions much closer.

Lots of progress since its initial release, but it looks like there is still work to be done for Maya Python API 2.0. For my immediate needs, I don’t see anything missing and I’m really excited to make the switch to 2.0 and I’d recommend starting with 2.0 if you’re working on a new project. There will still be situations where you’ll need to load both versions of the API to complete a task, but with fewer classes missing, it might be less of an inconvenience now.

These are the maya.OpenMaya 1.0 classes missing in 2.0:#

  • MAddRemoveAttrEdit
  • MAttributePatternArray
  • MCacheFormatDescription
  • MCameraSetMessage
  • MCommandResult
  • MComputation
  • MConnectDisconnectAttrEdit
  • MCurveAttribute
  • MDGContextGuard
  • MEdit
  • MEvaluationManager
  • MFcurveEdit
  • MFileIO
  • MFnAmbientLight
  • MFnAnisotropyShader
  • MFnAreaLight
  • MFnArrayAttrsData
  • MFnAssembly
  • MFnBlinnShader
  • MFnCameraSet
  • MFnDirectionalLight
  • MFnExpression
  • MFnFloatArrayData
  • MFnLambertShader
  • MFnLatticeData
  • MFnLayeredShader
  • MFnLight
  • MFnNonAmbientLight
  • MFnNonExtendedLight
  • MFnPartition
  • MFnPhongEShader
  • MFnPhongShader
  • MFnPointLight
  • MFnReflectShader
  • MFnSphereData
  • MFnSpotLight
  • MFnSubd
  • MFnSubdData
  • MFnSubdNames
  • MFnUint64SingleIndexedComponent
  • MFnVolumeLight
  • MIffFile
  • MIffTag
  • MImageFileInfo
  • MItCurveCV
  • MItEdits
  • MItGeometry
  • MItInstancer
  • MItSubdEdge
  • MItSubdFace
  • MItSubdVertex
  • MMessageNode
  • MNurbsIntersector
  • MParentingEdit
  • MPointOnNurbs
  • MProfiler
  • MProfilingScope
  • MRenderPassDef
  • MRenderPassRegistry
  • MSetAttrEdit
  • MStreamUtils
  • MTesselationParams
  • MTimer
  • MTrimBoundaryArray
  • array2dDouble
  • array2dFloat
  • array3dDouble
  • array3dFloat
  • array3dInt
  • array4dDouble
  • array4dFloat
  • array4dInt

These are the maya.OpenMayaAnim 1.0 classes missing in 2.0:#

  • MFnBlendShapeDeformer
  • MFnCharacter
  • MFnClip
  • MFnHikEffector
  • MFnIkEffector
  • MFnIkHandle
  • MFnIkJoint
  • MFnIkSolver
  • MFnKeyframeDelta
  • MFnKeyframeDeltaAddRemove
  • MFnKeyframeDeltaBlockAddRemove
  • MFnKeyframeDeltaBreakdown
  • MFnKeyframeDeltaInfType
  • MFnKeyframeDeltaMove
  • MFnKeyframeDeltaScale
  • MFnKeyframeDeltaTangent
  • MFnKeyframeDeltaWeighted
  • MFnLattice
  • MFnLatticeDeformer
  • MFnMotionPath
  • MFnWeightGeometryFilter
  • MFnWireDeformer
  • MIkHandleGroup
  • MIkSystem
  • MItKeyframe

These are the maya.OpenMayaRender 1.0 classes missing in 2.0:#

  • MCommonRenderSettingsData
  • MD3D9Renderer
  • MDrawProcedureBase
  • MFnImageSource
  • MFnRenderLayer
  • MFnRenderPass
  • MGLFunctionTable
  • MGeometryData
  • MGeometryLegacy
  • MGeometryList
  • MGeometryManager
  • MGeometryPrimitive
  • MGeometryRequirementsLegacy
  • MHardwareRenderer
  • MHwTextureManager
  • MHwrCallback
  • MLightLinks
  • MRenderCallback
  • MRenderData
  • MRenderSetup
  • MRenderSetupPrivate
  • MRenderShadowData
  • MRenderTargetLegacy
  • MRenderUtil
  • MRenderView
  • MRenderingInfo
  • MSwatchRenderRegister
  • MViewportRenderer
  • RV_AOV
  • RV_PIXEL

These are the maya.OpenMayaUI 1.0 classes missing in 2.0:#

  • MCursor
  • MDeviceChannel
  • MDeviceState
  • MDrawRequestQueue
  • MDrawTraversal
  • MEvent
  • MExternalDropCallback
  • MExternalDropData
  • MFeedbackLine
  • MFnToolContext
  • MGraphEditorInfo
  • MManipData
  • MObjectListFilter
  • MProgressWindow
  • MQtUtil
  • MToolsInfo