Lost Triangle

PyMel Development: With VSCode

Step 1: Configure Visual Studio Code

Install Visual Studio Code

Install Python Plugin

Step 2: Prepare Maya

From the Installation Guide from SendToMaya:

To enable ports at startup create a file named userSetup.mel in the following folder:

Windows: :\Documents and Settings\\My Documents\maya\\scripts
Mac OS X: ~/Library/Preferences/Autodesk/maya//scripts.
Linux: ~/maya//scripts.
(where ~ is your home folder)
In the userSetup.mel file add the following

Step 3: Autocomplete

Download Maya Devkit

Autodesk Maya Devkit
(Important: Devkit available for all Operating systems, select the correct one before clicking download)

Extract the package to the C:/Program Files/Autodesk/Maya2018/devkit directory.

Configure VSCode

Open the Settings and add following lines (Adjust to your OS):

Step 4: Test Setup

  1. Open Maya and VSCode
  2. In VSCode create a file test.py
  3. Write following lines:

  1. Press CTRL-ALT-M
  2. Check in Maya if a Sphere was created.