Home

Awesome

Maya Extension for Visual Studio Code

Version Installs Downloads Ratings

Average time to resolve an issue Percentage of issues still open

A Visual Studio Code extension with support for coding for Maya.

Features

Useful commands

Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:

CommandDescription
Maya: Send Python Code to MayaSend Python code from current editor in Maya.
Maya: Send MEL Code to MayaSend MEL code from current editor in Maya.

You can also select a block of code in the editor and Right-click -> Send Code to Maya, this is based on the current working language (Mel or Python).

Update for Maya 2022 and above.

Option for Maya 2022 and above

Opening the correct ports for Send to Maya Commands.

To open the correct ports in maya, you can use the following code.

Note: If your using a extension version higher than 0.9, then MEL and Python code use the same port in maya.

In the Maya script editor MEL Tab.

commandPort -name "localhost:7001" -sourceType "mel" -echoOutput;

Snippets

PrefixesDescription
ifCode snippet for an if statement
if/elseCode snippet for an if statement with else
elseifCode snippet for an else if
elseCode snippet for an else
do/whileCode snippet for a do while loop
switch/caseCode snippet for a switch case
procCode snippet for a procedure
proc(global)Code snippet for a global procedure
for/inCode snippet for a for loop
forCode snippet for a for loop with counter
whileCode snippet for a for while loop

Requirements

Autodesk Maya tested using Maya 2016 Windows and Linux but should work with all versions.

Issues, feature requests, and contributions

Release Notes

See CHANGELOG.md

See Recent Releases

Enjoy!