External type annotations for Autodesk Maya Python API.
The goal is to provide stubs for Pyright or ty language servers.
pip install types-mayaThe stubs are maintained manually and will likely remain incomplete for a long time.
I update the stubs based on my needs and mostly use Maya Python API 2.0 (maya.api).
| Import name | Status |
|---|---|
maya.api.OpenMaya |
🟠 Incomplete (~41%) |
maya.api.OpenMayaAnim |
🟠 Unannotated |
maya.api.OpenMayaRender |
🟠 Unannotated |
maya.api.OpenMayaUI |
🟠 Unannotated |
maya.cmds |
🟠 Unannotated |
maya.mel |
🟢 Complete |
maya.standalone |
🟢 Complete |
maya.OpenMaya |
🔴 Not Covered |
maya.OpenMayaAnim |
🔴 Not Covered |
maya.OpenMayaFX |
🔴 Not Covered |
maya.OpenMayaMPx |
🔴 Not Covered |
maya.OpenMayaRender |
🔴 Not Covered |
maya.OpenMayaUI |
🔴 Not Covered |
The stubs are written from the Maya 2025 Reference.
Annotated
is used to add context to some annotations. Some examples:
A sequence of 16 floats.
Annotated[Sequence[float], "[16]"]A sequence of 4 sequences of 4 floats.
Annotated[Sequence[Sequence[float]], "[4[4]]"]A sequence of 1 to 6 floats.
Annotated[Sequence[MArgType], "[1..6]"],A list of 4 int, the x, y, x and w axis.
Annotated[list[int], "[x, y, z, w]"]Deprecated property.
Annotated[Literal[5], "deprecated"]Contributions of any kind are welcome. Please open an issue or a submit pull request.