This subject is about getting source analysis \ auto-completion functionality setup in Wing IDE for Maya's
Note, Wing has their own tutorials on this, take a look at them here.
But the below instructions will work just fine.
Copy the subfolders living under here:
Restart wing, everything should be a go: You will get auto-completion for both the
maya.cmds
and maya.OpenMaya
(and associated API) packages.Note, Wing has their own tutorials on this, take a look at them here.
But the below instructions will work just fine.
Easy Way
I started implementing this in Maya 2013 (Win7), but it should probably work a few versions back.Copy the subfolders living under here:
C:\Program Files\Autodesk\Maya20XX\devkit\other\pymel\extras\completion\piOr here on Mac:
/Applications/Autodesk/mayay20XX/devkit/devkit/other/pymel/exras/completion/piAnd paste it (PC) under this dir (if the
pi-files
dir doesn't exist, create it). Note, this is Wing's 'Settings Directory', and you can find you local path to it under 'Help -> About...'.C:\Users\<userName>\AppData\Roaming\Wing IDE 4\pi-filesHere for Mac:
/Users/<userName>/.wingide4/pi-files
Note for Mac: TheThen in Wing, under 'Preferences -> Source Analysis -> Advanced', make sure there is a/.wingide4
directory seems to be hidden in Finder. To access it, open a Terminal, cd to that folder, and execute:$ open .To launch a Finder to that folder.
pi-files
listed under the "Filename" section.Restart wing, everything should be a go: You will get auto-completion for both the
maya.cmds
package, along with all the associated maya.OpenMaya
stuff.Slightly More Complex Way
API
A few notes that go along with Wing's above tutorial:- You need to compile the .pi files with Maya's version of Python, not your system level one.
- Here are examples of how to generate one from the command line, Windows7:
C:\Program Files\Autodesk\Maya2013\Python\Lib\site-packages\maya>"C:\Program Files\Autodesk\Maya2013\bin\mayapy.exe""C:\Program Files (x86)\Wing IDE 4.1\src\wingutils\generate_pi.py" OpenMaya OpenMaya.pi
- Note you need to call to Maya's version of python, but be in the same dir as the
OpenMaya.pyc
file. - After you compile them in that dir, you need to copy them to your pi-files dir:
C:\Users\<userName>\AppData\Roaming\Wing IDE 4\pi-files\maya
maya.cmds
To get auto-completion working formaya.cmds
, point Wing to this dir:C:\Program Files\Autodesk\Maya2013\devkit\other\pymel\extras\completion\piVia its
Edit -> Preferences -> Source Analysis -> Advanced ->
section, and "Insert" the path.