Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

[SOLVED] In Sublime3 can't get Maya Python autocompletion to work, help?

unit187
polycounter lvl 9
Offline / Send Message
unit187 polycounter lvl 9
Hey, I have this problem with getting Sublime to autocomplete Maya Python commands. Spent a few days on this problem, still can't find any solution.

I've installed "Maya Sublime" and "Jedi" packages for Sublime, of course. I suppose Jedi is supposed to assist with autocompletion, and as far as I can see I need to connect it with Maya devkit, where all Maya Python commands are stored. I thought I need to setup custom Python interpreter for Jedi, I followed their github instructions, but I guess I either use wrong syntax or typing it at wrong place.

Could anyone give a hint on how to setup it properly? Thanks!

Replies

  • Saf
    Offline / Send Message
    Saf polycounter lvl 11
  • unit187
    Offline / Send Message
    unit187 polycounter lvl 9
    Saf, I tried to plug in the path in both sublime project file (in my case RigLibrary.sublime-project) and in Jedi settings file (sublime_jedi.sublime-settings). I ended up just plugging the path everywhere I could in these files, but it still doesn't work. What am I missing? Where specifically should I put the path?
    RigLibrary.sublime-project file now looks like this (note I tried both forward and backslashes to be sure I don't mess them up, it doesn't help):
    1. Z:\\Program Files\\Autodesk\\Maya2015\\devkit\\other\\pymel\\extras\\completion\\py",
    2. {
    3. "folders":
    4. [
    5. {
    6. "path": "."
    7. }
    8. ],
    9.  
    10. "settings":
    11. {
    12. // ...
    13. "python_interpreter": "
    1. "python_package_paths":
    2. [
    3. "Z:\\Program Files\\Autodesk\\Maya2015\\devkit\\other\\pymel\\extras\\completion\\py"
    4. ]
    5. }
    6. }

    And excerpt from jedi settings
    1.  
    2. // Used to get the `PYTHONPATH`.
    3. // You can set a path to your python interpreter,
    4. // for example `/home/user/.virtualenvs/myenv/bin/python)`.
    5. "python_interpreter": "Z:\\Program Files\\Autodesk\\Maya2015\\devkit\\other\\pymel\\extras\\completion\\py",
    6.  
    7. // Additional python package paths.
    8. "python_package_paths": ["Z:\\Program Files\\Autodesk\\Maya2015\\devkit\\other\\pymel\\extras\\completion\\py"],

  • Saf
  • unit187
    Offline / Send Message
    unit187 polycounter lvl 9
    Finally got it working! Saf, thanks for the link! It helped on the journey, though there was 1 final step that I discovered I had to do in order to make autocompletion work. That is to specify Python path all the way up to "python.exe". In my case it was:

    1.  
    2. "Z:/Python27/python.exe"

Sign In or Register to comment.