Quantcast
Channel: mel wiki
Viewing all articles
Browse latest Browse all 610

Source Analysis in Wing

$
0
0
This subject is about getting source analysis \ auto-completion functionality setup in Wing IDE for Maya's 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\pi
Or here on Mac:
/Applications/Autodesk/mayay20XX/devkit/devkit/other/pymel/exras/completion/pi
And 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-files
Here for Mac:
/Users/<userName>/.wingide4/pi-files
Note for Mac: The /.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.
Then in Wing, under 'Preferences -> Source Analysis -> Advanced', make sure there is a 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 for maya.cmds, point Wing to this dir:
C:\Program Files\Autodesk\Maya2013\devkit\other\pymel\extras\completion\pi
Via its Edit -> Preferences -> Source Analysis -> Advanced -> section, and "Insert" the path.

Viewing all articles
Browse latest Browse all 610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>