Maya's script editor isn't very popular. It's easy to write in a chat, though.
So write the code in an external editor and send it to Maya, There are several editors that offer this method.
I tried it via Atom, so it's a memorandum.
Python
You need to have Python installed in advance. https://www.python.org/downloads/
File > Setting (ctl
+ ,
)
Open the Setting tab with, and search for "maya" with "Install".
You will see a ** atom to Maya ** package at the top (▲).
Details like this. Run the Python Script. * MEL cannot be sent *. Click "Install".
Then, "** Maya **" will be added to the Packages menu.
The transmission from Atom to Maya is ʻalt+
ctrl +
r`.
This is the preparation on the Atom side. Next is the preparation on the Maya side.
Create the following content with the file name ** userSetup.py ** Save to "Scripts" in the Maya folder under the document.
userSetup.py
import maya.cmds as cmds
cmds.commandPort(name=":7005", sourceType="python")
Then start Maya and
All you have to do is write the code in Atom and do ʻalt+
ctrl +
r`.
For the time being, ʻalt+
ctl +
r` will send the entire ** code you are writing ** to Maya.
If you select a part, ** only the selected part ** will be sent.
Nothing happens if Maya is not running.
You need to save the file you are writing before sending it to Maya. The standard script editor can be executed immediately after writing, so this is more troublesome.
I think it's a good idea to set the ** file extension ** to ** .py **, but In fact, no matter what the extension, ** select a part and Run ** will pass. (If you want to run without selection, it must be .py)
There is a report on this matter here https://github.com/davidpaulrosser/atom-maya/issues/11
Editor Atom developed by Github https://atom.io/
Autodesk Maya http://www.autodesk.co.jp/products/maya/overview
"Atom-maya" is a package developed by david paulrosser https://github.com/davidpaulrosser/atom-maya https://atom.io/packages/maya
Searching for "atom maya" will bring up a page about ** ATOM ** in the Maya documentation. This is a description of the file format provided by Maya for inputting and outputting animations. ** Not related to Atom in the editor **.
http://help.autodesk.com/cloudhelp/2016/JPN/Maya/files/GUID-6C84AB97-1766-4260-9C2A-754C9578AE42.htm
I also found a plugin for the sublime editor, so make a note
--Development: justinfx --Plugin name: MayaSublime
Atom 1.2.4 atom-maya package 0.17.0 Autodesk Maya 2016 Extension 1 + SP4
Recommended Posts