Skip to content

Visual Studio Code Extension for Autdoesk Maya Python Developer

License

Notifications You must be signed in to change notification settings

FXTD-ODYSSEY/vscode-mayapy

Repository files navigation

VS Code Extension for Autodesk Maya Python Intellisense and Debugging

MayaPy Feature


  • Add Python Intellisense for maya python module

01_module

  • Display more module information and link the document directly

02_link

  • Integrate the python debugger that allow you set the breakpoint to test the code in Maya

    1. right click the menu item Debug Current Python File to Maya , if you didn't activate the command Port in Maya,it will tell you the mel command to activate it. 03_debug_commandPort
    2. if the python ptvsd debug module didn't initialize,it will import the module automatically and show the message for you. 04_debug_ptvsd
    3. if all the step had been done, congratulation ,you could use breakpoint to debug your python file in Maya. 05_debug_breakpoint

Todolist


Module Intellisense Feature

Intellisense feature is completely base on the vscode python extension autocompletion feature.
when you activate the extension , it will add the completion path to the setting.json python.autoComplete.extraPaths attribute

07_python_extrapath

By the way, I recommend you enable Jedi for performance issue temporarily.
Current Python Language Server is pretty slow when you try to pop up the autocompletion list.
Even so, Jedi also may not the perfect solution , you could check this issue.

08_jedi_enable

The origin completion python code came from the Maya developer center devkit
devkit path : devkitBase\devkit\other\pymel\extras\completion\py

06_completion_py

  • maya.cmds
  • OpenMaya 1.0
  • OpenMaya 2.0
  • pymel
  • pyside2

Better Intellisense Feature

The origin completion code already get the running module for intellisense.
but some module lack of the detail information for the specific function or class.
I try to extract more information from the Maya online document to build a better completion file.
MayaDoc repo is how I extract the data from the Maya online document

  • maya.cmds
    • add link to the document
    • add the parameter intellisense
  • OpenMaya 1.0
  • OpenMaya 2.0
  • pymel
  • pyside2

Debug Feature

  • integrate python ptvsd debug module
  • auto setup python debug environment
  • add the debug python file button on the right click menu
  • add the debug configuration snippet

Extensions Dependencies


  • Python - Linting, Debugging (multi-threaded, remote), Intellisense, code formatting, refactoring, unit tests, snippets, Data Science (with Jupyter), PySpark and more.
  • mayaCode - A Visual Studio Code extension with support for coding for Maya.

About

Visual Studio Code Extension for Autdoesk Maya Python Developer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published