Use Atom as Python Editor for Maya

Atom is a neat text-editor created by Github. Atom can be extended with plugins and somebody already created a useful “atom-maya” plugin that enables you to send your current code to Maya.

Software Needed

Installation

Python

Simply download the installation files and follow the Installation instructions. During the installation of Python enable “Add Python.exe to Path”

Python

Atom

Simply download the installation files and follow the Installation instructions.

  1. Then open Atom
  2. Open the settings panel File > Settings (Ctrl+Comma)
  3. Go to “Install Packages”, search and install “atom-maya”.

2016-05-03 20_03_15-Settings — C__Users_info_Documents_einfuehrung-in-maya — Atom

Maya Configuration

To be able to send Code from Atom to Maya you need to open a command Port. We are going to set up Maya that this Command Port will be opened each time Maya starts.

When Maya starts it looks for a file called “userSetup.py” in the folder “/Users/<user>/Library/Preferences/Autodesk/maya/<version>/scripts“. If it exists it will execute the file.

Step 1

If the “userSetup.py” file does not exist – simply create a new file in Atom and save it as “userSetup.py” in the folder.

Step 2

Then add following lines of code:

Step 3

Restart Maya.

Test

Now that everything is set up, lets test if everything works.

Step 1

Open Maya and Atom.

Step 2

In Atom create a new file “test.py” add following code:

Step 3

Press “Ctrl+Alt+R” to send the code to Maya. If everything went ok, a polyCube was created.

Troubleshooting

“python” is not recognized as an internal or external command. : Run the python installer again and doublecheck if you set “add python.exe to path” (Or just add it manually to the windows system environment.

Script execution error. The plugin does not support python 3 : you can fix that by downloading python 2.