Oct 21, 2011 at 5:40 PM
Edited Oct 21, 2011 at 5:43 PM
I spent a few hours getting this to work, so I wanted to share my experience on how I got it working for other's benefit. And if the PTVS devs want to chime in on how this can be improved, that would be great also.
This is how I got PTVS working with Mayapy and Pymel. This is assuming Maya 2012 64-bit:
- Install Visual Studio 2010, Maya 2012 64-bit, PTVS
Make a new Interpreter:
- In Visual Studio, Tools->Options->Python Tools->Interpreter Options. Click Add Interpreter.
- Name: Mayapy 2012 64-bit
- Path: C:\Program Files\Autodesk\Maya2012\bin\mayapy.exe
- Windows Path: <leave blank>
- Architecture: x64
- Language Version: 2.6
- Path Environment Variable: PYTHONPATH
Create a new Python Project:
- File->New->Project. Other Launguages->Python->Python Application. Fill out name, hit Ok
- Right-click Search Path->Add Search Path. Set it to C:\Program Files\Autodesk\Maya2012\Python\lib\site-packages\pymel\core
- Change the .py file to test something in pymel:
import pymel as pm
- Hit F5 to test
With this setup, I was able to debug and get Intellisense for Pymel and everything seems to be working good.
The only issue that comes up is that when Debugging, there are 3 exceptions that get triggered on startup. This is happening within the Pymel code. If I hit 'Continue' each time however, execution proceeds normally. Is there a way to ignore