This tutorial was updated in May 2014.
There are many choices when it comes to deciding on an IDE. At the time when I decided on Eclipse (back in 2005) I needed an editor that could do the following:
- useable across multiple platforms
- supported programming in Python, C++, mel, Java
- had syntax highlighting and code completion
- supported writing of plugins (I needed to connect with Maya's environment)
This tutorial will outline the steps I've taken to make Eclipse my Maya IDE. I will address the following:
- enabling communication to and from Maya within Eclipse
- quickly access documentation from often used libraries
- setting up code completion for Maya Python commands and Maya API
- provide a mel editor with syntax highlighting
Please let me know if there are further improvements you'd like addressed.
A. Basic resources.
Eclipse:
https://www.eclipse.org/
Pydev the open source python plugin for Eclipse
https://pydev.sourceforge.net/
Eclipse Color Themes
https://eclipsecolorthemes.org/?view=plugin
Eclipse Colorer Plugin
https://colorer.sourceforge.net/eclipsecolorer/index.html
Maya Eclipse Editor Plugin
https://www.creativecrash.com/maya/downloads/applications/syntax-scripting/c/eclipse-maya-editor
Eclipse Autocompletion for Maya
https://www.creativecrash.com/maya/downloads/applications/misc/c/eclipse-autocompletion-for-maya-python-api
Maya Eclipse mel Plugin
https://www.creativecrash.com/downloads/applications/syntax-scripting/c/eclipse-maya-mel
B. Maya Editor
Features:
- Import the script being edited (add the script location to sys.path and import/reload it)
- Send the entire contents of an editor to Maya
- Send a highlighted selection to Maya
- Get results back from Maya in a dedicated console view
- Anything done within Maya's own script editor is also echoed in the console view
- Change the port number of the socket at any time
- Open up documentation for Maya's Python API, Python Commands, Pymel, Qt, PySide, PyQt
Setup Eclipse:
New - Use the Eclipse Marketplace to install the plugin
Open the Help/Marketplace and search for "Maya Eclipse Connect" and follow the instructions to install
Or:
1. Get the plugin from the link above and unzip the downloaded file in a temp directory
2. Within Eclipse, you should be able to use the "Help/Install New Software" menu. But I've found this to not always work. Even though it's frowned upon, the easiest way is to manually copy the
eclipseMayaEditor_2015.0.0.201405032156.jar
to: [your Eclipse directory]/plugins/
3. Relaunch Eclipse and once it's back, the EclipseMaya toolbar should be visible
Setup Maya:
In Maya, create a new python shelf button with the following code or put it in the Startup script. This will launch a Maya command port that enables communication with Eclipse. The port number should match the port number within the Eclipse plugin preferences.
import maya.cmds as cmds
if cmds.commandPort(':7720', q=True) !=1:
cmds.commandPort(n=':7720', eo = False, nr = True)
Command hotkeys:
- Ctrl + \ -> Import/Reload the script in the editor to Maya
- Ctrl + Return -> Send all editor contents to Maya
- Ctrl + ' -> Send highlighted selection to Maya
- Ctrl + ] -> Connect Eclipse to Maya
You can remap these hotkeys if you want something different. Go into "Window/Preferences/General/Keys" and use a filter to display the Maya Editor commands. The filter should be: *Maya
Preferences:
- Port Number - By default, the port number has been set to 7720. It can be changed at any time. Remember to press the "Reconnect Eclipse to Maya" button. This is handy if you have more than one instance of Maya open at once.
- Update Interval: This sets how often Eclipse checks to see if there's any new text in Maya. It is in time units of seconds.
- The next eight text fields set the location of the various sets of documentation. They can be entered either as web URLs or local file paths depending on where the docs are located. There are 2 user defined options for other documentation sites (If anyone needs more, let me know and I can add more).
Author: rbublitz
Submitted: 2008-12-18 22:07:56 UTC
Tags: maya, Eclipse, autocompletion, mel, and Python
Software: Maya
Views: 286,358
Related Items
-
TTools - Pro - Professional Tools 7.0.0 for Maya (maya script)
$29.99 (USD) -
Curve Tools for Maya 1.3.0 (maya script)
$25.00 (USD) -
Animated Olympic Fire 2014 (Maya) 3D Model
$69.00 (USD) -
Elephant 3d textured model 3ds max and maya scene files 3D Model
$30.00 (USD) -
"Rapid Rig: Poser" for Maya for Maya 2.0.9 (maya script)
$20.00 (USD) -
Gradient Data Manager script for Maya for Maya 1.1.1 (maya script)
$20.00 (USD) -
Maya sdd_UIDesigner stand-alone 2.1.0 for Maya (maya script)
$20.00 (USD) -
Wireform for Maya 2020-2023 1.0.0 for Maya (maya plugin)
$49.00 (USD) -
Nick-Maya Rig With Advance Facial Setup for Maya 0.1.0
$20.00 (USD)