Skip to content

benjaminghys/Maya-stubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

158 Commits
 
 

Repository files navigation

✅ Maya Python API 2.0 Stub Progress

Page visits

Total progress: 306 / 306 classes complete.

Last Updated: 2026-02-20

Estimated number of unit tests: ~16,786¹

Finalizing the stubs...

Stress testing stubs against existing repositories...

This public repository tracks the ongoing development of strict, manually unit-tested Python stubs for Autodesk Maya's Python API 2.0. These stubs provide accurate type hints, correct argument signatures, and are fully compatible with static type checkers like MyPy.


🎯 Project Goals

  • Deliver strict but accurate Maya stubs - no autogenerated junk.
  • Each class and function is individually verified through unit testing in a real Maya 2026 environment.
  • Designed to support the same or later Python versions of Maya's interpreter.
    • Maya 2026: 3.11+
    • Maya 2025: 3.11+
    • Maya 2024: 3.10+
    • Maya 2023: 3.9+
    • Maya 2022: 3.7+
  • Once full coverage is reached for Maya 2026, older Maya versions will follow.
  • Stubs will be created in this order: 2026, 2025, 2024, 2023, ...

🛠️ What to Expect

  • Progress is tracked live in this README.
  • New classes are completed regularly - this is a solo project with weekly updates.
  • Once v1.0 is complete, distribution details will be announced here.
  • Pricing will remain accessible for individuals and freelancers, with tiered licensing for studios.

⭐ How You Can Support

  • Star this repository to follow development and get notified when releases drop.
  • Share this project with fellow Technical Artists or Maya Python scripters who demand better tooling.
  • Your support makes a huge difference for a one-person dev shop building tools for the community.

🔍 Module Progress

maya.api.OpenMaya

162 / 162 classes complete
  • MAngle
  • MArgDatabase
  • MArgList
  • MArgParser
  • MArrayDataBuilder
  • MArrayDataHandle
  • MAttributeIndex
  • MAttributePattern
  • MAttributeSpec
  • MAttributeSpecArray
  • MBoundingBox
  • MCacheSchema
  • MCallbackId
  • MCallbackIdArray
  • MCameraMessage
  • MColor
  • MColorArray
  • MCommandMessage
  • MConditionMessage
  • MContainerMessage
  • MDAGDrawOverrideInfo
  • MDGContext
  • MDGMessage
  • MDGModifier
  • MDagMessage
  • MDagModifier
  • MDagPath
  • MDagPathArray
  • MDataBlock
  • MDataHandle
  • MDistance
  • MDoubleArray
  • MEulerRotation
  • MEvaluationNode
  • MEvaluationNodeIterator
  • MEventMessage
  • MExternalContentInfoTable
  • MExternalContentLocationTable
  • MFileObject
  • MFloatArray
  • MFloatMatrix
  • MFloatPoint
  • MFloatPointArray
  • MFloatVector
  • MFloatVectorArray
  • MFn
  • MFnAssembly
  • MFnAttribute
  • MFnBase
  • MFnCamera
  • MFnComponent
  • MFnComponentListData
  • MFnCompoundAttribute
  • MFnContainerNode
  • MFnDagNode
  • MFnData
  • MFnDependencyNode
  • MFnDisplayLayer
  • MFnDisplayLayerManager
  • MFnDoubleArrayData
  • MFnDoubleIndexedComponent
  • MFnEnumAttribute
  • MFnGenericAttribute
  • MFnGeometryData
  • MFnIntArrayData
  • MFnLightDataAttribute
  • MFnMatrixArrayData
  • MFnMatrixAttribute
  • MFnMatrixData
  • MFnMesh
  • MFnMeshData
  • MFnMessageAttribute
  • MFnNumericAttribute
  • MFnNumericData
  • MFnNurbsCurve
  • MFnNurbsCurveData
  • MFnNurbsSurface
  • MFnNurbsSurfaceData
  • MFnPlugin
  • MFnPluginData
  • MFnPointArrayData
  • MFnReference
  • MFnSet
  • MFnSingleIndexedComponent
  • MFnStringArrayData
  • MFnStringData
  • MFnTransform
  • MFnTripleIndexedComponent
  • MFnTypedAttribute
  • MFnUInt64ArrayData
  • MFnUnitAttribute
  • MFnVectorArrayData
  • MGlobal
  • MImage
  • MInt64Array
  • MIntArray
  • MItCurveCV
  • MItDag
  • MItDependencyGraph
  • MItDependencyNodes
  • MItGeometry
  • MItMeshEdge
  • MItMeshFaceVertex
  • MItMeshPolygon
  • MItMeshVertex
  • MItSelectionList
  • MItSurfaceCV
  • MIteratorType
  • MLockMessage
  • MMatrix
  • MMatrixArray
  • MMeshIntersector
  • MMeshIsectAccelParams
  • MMeshSmoothOptions
  • MMessage
  • MModelMessage
  • MNamespace
  • MNodeCacheDisablingInfo
  • MNodeCacheSetupInfo
  • MNodeClass
  • MNodeMessage
  • MObject
  • MObjectArray
  • MObjectHandle
  • MObjectSetMessage
  • MPlane
  • MPlug
  • MPlugArray
  • MPoint
  • MPointArray
  • MPointOnMesh
  • MPolyMessage
  • MPxAttributePatternFactory
  • MPxCommand
  • MPxData
  • MPxGeometryData
  • MPxGeometryIterator
  • MPxNode
  • MPxSurfaceShape
  • MQuaternion
  • MRampAttribute
  • MRichSelection
  • MSceneMessage
  • MSelectionList
  • MSelectionMask
  • MSpace
  • MSyntax
  • MTime
  • MTimeArray
  • MTimeRange
  • MTimerMessage
  • MTransformationMatrix
  • MTypeId
  • MURI
  • MUint64Array
  • MUintArray
  • MUserData
  • MUserEventMessage
  • MUuid
  • MVector
  • MVectorArray
  • MWeight

maya.api.OpenMayaAnim

12 / 12 classes complete
  • MAnimControl
  • MAnimCurveChange
  • MAnimCurveClipboard
  • MAnimCurveClipboardItem
  • MAnimCurveClipboardItemArray
  • MAnimMessage
  • MAnimUtil
  • MFnAnimCurve
  • MFnGeometryFilter
  • MFnIkJoint
  • MFnSkinCluster
  • MFnWeightGeometryFilter

maya.api.OpenMayaRender

87 / 87 classes complete
  • MAttributeParameterMapping
  • MAttributeParameterMappingList
  • MBlendState
  • MBlendStateDesc
  • MCameraOverride
  • MClearOperation
  • MColorManagementUtilities
  • MComponentDataIndexing
  • MComponentDataIndexingList
  • MDepthNormalizationDescription
  • MDepthStencilState
  • MDepthStencilStateDesc
  • MDrawContext
  • MDrawRegistry
  • MFragmentManager
  • MFrameContext
  • MGeometry
  • MGeometryExtractor
  • MGeometryIndexMapping
  • MGeometryRequirements
  • MGeometryUtilities
  • MHUDRender
  • MIndexBuffer
  • MIndexBufferDescriptor
  • MIndexBufferDescriptorList
  • MInitContext
  • MInitFeedback
  • MIntersection
  • MLightParameterInformation
  • MPassContext
  • MPresentTarget
  • MPxComponentConverter
  • MPxDrawOverride
  • MPxGeometryOverride
  • MPxImagePlaneOverride
  • MPxIndexBufferMutator
  • MPxPrimitiveGenerator
  • MPxShaderOverride
  • MPxShadingNodeOverride
  • MPxSubSceneOverride
  • MPxSurfaceShadingNodeOverride
  • MPxVertexBufferGenerator
  • MPxVertexBufferMutator
  • MQuadRender
  • MRasterizerState
  • MRasterizerStateDesc
  • MRenderItem
  • MRenderItemList
  • MRenderOperation
  • MRenderOverride
  • MRenderParameters
  • MRenderProfile
  • MRenderTarget
  • MRenderTargetAssignment
  • MRenderTargetDescription
  • MRenderTargetManager
  • MRenderUtilities
  • MRenderer
  • MSamplerState
  • MSamplerStateDesc
  • MSceneRender
  • MSelectionContext
  • MSelectionInfo
  • MShaderCompileMacro
  • MShaderInstance
  • MShaderManager
  • MStateManager
  • MStencilOpDesc
  • MSubSceneContainer
  • MSubSceneContainerIterator
  • MSwatchRenderBase
  • MTargetBlendDesc
  • MTexture
  • MTextureAssignment
  • MTextureDescription
  • MTextureManager
  • MTextureUpdateRegion
  • MUIDrawManager
  • MUniformParameter
  • MUniformParameterList
  • MUserRenderOperation
  • MVaryingParameter
  • MVaryingParameterList
  • MVertexBuffer
  • MVertexBufferArray
  • MVertexBufferDescriptor
  • MVertexBufferDescriptorList

maya.api.OpenMayaUI

45 / 45 classes complete
  • M3dView
  • MCursor
  • MDrawData
  • MDrawInfo
  • MDrawProperties
  • MDrawRequest
  • MEvent
  • MFnCircleSweepManip
  • MFnCurveSegmentManip
  • MFnDirectionManip
  • MFnDiscManip
  • MFnDistanceManip
  • MFnFreePointTriadManip
  • MFnManip3D
  • MFnPointOnCurveManip
  • MFnPointOnSurfaceManip
  • MFnRotateManip
  • MFnScaleManip
  • MFnStateManip
  • MFnToggleManip
  • MHWShaderSwatchGenerator
  • MManipData
  • MMaterial
  • MMaterialArray
  • MPaintMessage
  • MPanelCanvas
  • MPanelCanvasInfo
  • MPxContext
  • MPxContextCommand
  • MPxDragAndDropBehavior
  • MPxHardwareShader
  • MPxHwShaderNode
  • MPxLocatorNode
  • MPxManipContainer
  • MPxManipulatorNode
  • MPxSelectionContext
  • MPxSurfaceShapeUI
  • MPxToolCommand
  • MSelectInfo
  • MTextureEditorDrawInfo
  • MTimeSliderCustomDrawManager
  • MTimeSliderDrawPrimitive
  • MUiMessage
  • RenderParameters
  • ShaderContext

📦 Sample Stub

Here's an example of a fully tested, strict Python stub for maya.api.OpenMaya.MArgList. These stubs aim to match Maya's internal API behavior as closely as possible.

Click to expand

[!NOTE] This stub is meant to work with Python 3.11+.

from typing import overload, Final, Union, Self, List, Optional
from maya.api.OpenMaya import MArgList, MAngle, MDistance, MPoint, MTime, MVector, MDoubleArray, MIntArray, MMatrix


class MArgList:
    kInvalidArgIndex: Final[int] = -1

    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, src: MArgList, /) -> None: ...
    __doc__: Final[str] = "Argument list for passing to commands."
    def __len__(self) -> int: ...
    def addArg(self, value: Union[bool, int, float, str, MAngle, MDistance, MPoint, MTime, MVector], /) -> Self: ...
    def asAngle(self, index: int, /) -> MAngle: ...
    def asBool(self, index: int, /) -> bool: ...
    def asDistance(self, index: int, /) -> MDistance: ...
    def asDouble(self, index: int, /) -> float: ...
    def asDoubleArray(self, index: int, /) -> MDoubleArray: ...
    def asFloat(self, index: int, /) -> float: ...
    def asInt(self, index: int, /) -> int: ...
    def asIntArray(self, index: int, /) -> MIntArray: ...
    def asMatrix(self, index: int, /) -> MMatrix: ...
    def asPoint(self, index: int, /, numElements: int=3) -> MPoint: ...
    def asString(self, index: int, /) -> str: ...
    def asStringArray(self, index: int, /) -> List[str]: ...
    def asTime(self, index: int, /) -> MTime: ...
    def asVector(self, index: int, /, numElements: int=3) -> MVector: ...
    def flagIndex(self, shortFlag: str, /, longFlag: Optional[str]=None) -> int: ...
    def lastArgUsed(self) -> int: ...

¹ Includes inherited tests across similar types (e.g., M*Array or MFn*ArrayData classes), total can slightly deviate.


Thanks for following the journey!

Releases

No releases published

Packages

 
 
 

Contributors