Monthly Archives: July 2012

Eclipse as Python Editor for Maya 2013

Under Resources is the original tutorial, this is a shorter compact Version

 Downloads

Programs:

http://www.eclipse.org

Pydev:

In Eclipse install using Help > Install New Software add new Site.

http://pydev.org/updates

Eclipse – Maya Plugin:

http://www.creativecrash.com/maya/downloads/applications/c/eclipse-maya-editor

Extract to any folder

Install via Help > Install New Software . Click on “Add” and then “Local” and navigate to the directory

Eclipse Configuration

Python Interpreter

  1. Under Window > Preferences – configure “Interpreter- Python”:
  2. Click on “New and select as Interpreter “C:\Program Files\Autodesk\Maya2013\bin\mayapy.exe”
  3. Include all folders

Autocomplete

  1.  In the same window
  2. Open the tab called “Predefined”
  3. Click on “New” and navigate  to C:\Program Files\Autodesk\Maya2013\devkit\other\pymel\extras\completion\pypredef (or whatever directory with the proper .pypredef files)
  4. Click “Apply”

 Maya Confguration

In Maya, create a new shelf button with the following code

import maya.cmds as cmds
if cmds.commandPort(':7720', q=True) !=1:
     cmds.commandPort(n=':7720', eo = False, nr = True)

Alternative in the folder:

Users\Username\Documents\maya\2013-x64\scripts

Create the a text file with the code userSetup.py

Conclusion

You can now use Eclipse and  with Strg-Enter send the code to Maya

In addition by clicking the “Connect to Maya” button (strg + ]) you can see all consoleoutput directly in Eclipse.

Resources:

http://www.creativecrash.com/tutorials/using-eclipse-as-a-maya-ide