Skip to main content

Type Annotated Stubs for Autodesk Maya's python APIs

Project description

Maya Stubs

Type Annotated Stubs for Autodesk Maya's python APIs

Goals

Provide fully type annotated stubs for maya.cmds and OpenMaya 1.0 & 2.0

Status

Note that is very much in progress and it is unlikely that the stubs will ever be perfect.
At this point, even if some of the maya.cmds annotations are wrong/misleading, I would consider it a better experience than using the stubs from the devkit. The stubs from OpenMaya 1.0 and 2.0 are very minimal and only have *args, **kwargs signatures, which should be pretty close to the devkit stubs.

  • 🚧 maya.cmds: In Progress
    • Stubs for all commands.
    • Accurate Arguments signatures for most commands. Parsed from the HTML Docs or the synopsys from cmds.help("command")
    • Accurate Positional Only Arguments for most command.
    • Accurate Return types on most commands
    • Docstrings.
    • Accurate Arguments signatures all commands.
    • Accurate Return types all most commands
  • 🚧 OpenMaya 1.0: Incomplete
    • Stubs for all members
    • Accurate Argument Signatures
    • Return Types
    • Docstrings.
  • 🚧 OpenMaya 2.0: Incomplete
    • Stubs for all members
    • Accurate Argument Signatures
    • Return Types
    • Docstrings.

Installation

You can get the stubs with one of two ways:

  1. Run pip install maya-stubs from the python executable used by your IDE.
  2. Download them manually from the Github releases and let your IDE know of their location.

Notes

PyCharm maya.cmds completion

PyCharm users may not see code completion for maya.cmds as the editor limits code insight features by default on files over 2.5 MB for performance reasons. Currently the cmds stub is over this limit.

This value can be increased in PyCharm's properties, accessible via the Help > Edit Custom Properties menu.

Code completion should work after adding the line below to the properties file and restarting PyCharm. This example overrides the default value from 2.5 MB to 10 MB. The value may be customized as needed, but keep in mind it can affect editor performance.

idea.max.intellisense.filesize = 10000

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maya_stubs-0.4.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

maya_stubs-0.4.1-py2.py3-none-any.whl (1.4 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file maya_stubs-0.4.1.tar.gz.

File metadata

  • Download URL: maya_stubs-0.4.1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.2 Windows/10

File hashes

Hashes for maya_stubs-0.4.1.tar.gz
Algorithm Hash digest
SHA256 d9b8c515da2a446fdc493853a7dacb2758183208aef2f6f13e190c3d009cc8d5
MD5 834a0b9ed7073ab971314fcc53ee119d
BLAKE2b-256 d17622b910b2ebbcc306edac24c248fecc78591398a8d8500fa1c53263ea2973

See more details on using hashes here.

File details

Details for the file maya_stubs-0.4.1-py2.py3-none-any.whl.

File metadata

  • Download URL: maya_stubs-0.4.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.2 Windows/10

File hashes

Hashes for maya_stubs-0.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d17e4b5bfced49d333991a1df0815c3eb159fce88fce0b23cb5e10d53d3480a7
MD5 2c1bfe7a9d5a95bce205fa2b29aba490
BLAKE2b-256 9fce3b4b049140e19df5735adee90087db05f46558dad7a46ada684318c0e63a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page