After I switched from PyCharm IDE to Visual Studio, just because I`m used to it and it works better in terms of debugging with Maya in my opinion, I found that IntelliSence is not working as it supposed to be. After a short investigation and reading a bunch forums, I found that it is a quite common issue, but luckily there is a quite simple solution.
So, to make auto completion work in VS with your Maya, you need to install PTVS first. You can download it here http://pytools.codeplex.com/
After that let’s make a new python project
Once you done, let’s add a search path, so the VS will know where to look at auto completion files.
And now you need to add these folders you your paths:
- C:\Program Files\Autodesk\Maya2016\Python\Lib\site-packages;
- C:\Program Files\Autodesk\Maya2016\devkit\other\pymel\extras\completion\py\maya;
- C:\Program Files\Autodesk\Maya2016\Python\Lib\site-packages\pymel\core;
- C:\Program Files\Autodesk\Maya2016\lib;
- C:\Program Files\Autodesk\Maya2016\devkit\other\pymel\extras\completion\py
After that make sure that you’ve setted up a python environment. To do that you need to go to TOOLS>Options>Python tools>Environment Options.
That’s it! Now IntelliSence should work.
If you have some questions, feel free to contact me.
If you have a fresh windows installation, make sure that you made a link to the maya python module. Just go to the maya bin folder, for example like this “c:\Program Files\Autodesk\Maya2015\bin”. Then open cmd from here as an administrator and type mklink python.exe mayapy.exe. After that create a environment variable PYTHONPATH=”c:\Program Files\Autodesk\Maya2015\bin\python.exe”