April 12, 2017

PyMel completions in Sublime Text

Getting code completions to work can be pretty annoying, but using them can really speed up your work.

Luckily this is surprisingly easy to do in Sublime Text by using the wonderful SublimeJEDI package (easily installed with Sublime Package Control).

As a prerequisite you need to have the Maya devkit 2016 2017 installed as it no longer comes included in Maya by default.

If you have other python related packages installed in Sublime Text, other than SublimeJEDI you should remove or disable them until you get completions working, then add them back in later. This will let you debug if you did something wrong or there is another conflict.

With SublimeJEDI installed, open the Sublime settings file:


In the User settings file on the right-hand side add a few lines:


Make sure you add a comma first if there are already settings in this file. Sublime will highlight pink if there are errors in the settings file, so pay attention!
Set the python_interpreter to the location of mayapy for your machine. Adjust the / to be \ on Windows.
Set the python_package_paths to point to the devkit folder as shown above.

Restart Sublime and get coding!



No comments:

Post a Comment