[Maya-Python] MEL Autocompletion for Sublime and MayaSublime

914 views
Skip to first unread message

Jan:

unread,
Apr 3, 2014, 3:12:14 PM4/3/14
to python_in...@googlegroups.com
Hi All,

Justin Israel made an awesome extension for the Sublime Text editor called MayaSublime.
https://github.com/justinfx/MayaSublime

But I noticed there is no auto completion file for the MEL syntax so I descided to generate one.

This contains all MEL commands that I can find. Half of these are generated by the help of the maya help command:
    help -list "*"

The rest is generated by parsing all the mel scripts in the maya instalation scripts folder.

Hope this is of some help to people still having to manage legacy MEL scripts ^^.

I also added the script that I wrote to generate this which might be usefull if you are working in a different version of Maya than this file is generated from. (Maya 2014)

Feel free use edit and or modify these files in any way you see fit.

Justin: In case you read this feel free to add and these files to the MayaSublime package.

( zipped the sublime completions as its a 5 meg json text file )

SublimeMelAutocompletion.py
MEL-sublime-completions.zip

Jan:

unread,
Apr 3, 2014, 3:20:03 PM4/3/14
to python_in...@googlegroups.com
note* by default this file should live here:

C:\Users\<userName>\AppData\Roaming\Sublime Text 3\Packages\MayaSublime

Justin Israel

unread,
Apr 3, 2014, 4:00:00 PM4/3/14
to python_in...@googlegroups.com
Hey Jan,

Thanks for working on that. I would be inclined to add the completion file if it only contained the commands API. It appears there may be a lot of extra cruft in the way you have generated it so far. Are you grabbing all procs, regardless of whether they are global or not? 

-- justin



--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAC_0f0-1F%3DdR6dr2NS8vn%3DD2_-xHxJNgimsUa_azhg_ouW9OKA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Jan:

unread,
Apr 3, 2014, 4:15:35 PM4/3/14
to python_in...@googlegroups.com

Ah yes good point. I'll modify the script to only take global procs.

Also ill add an argument to just do the commands that maya returns with its help function. This should create a file that resembles the commands that are listed in the documentation.

Cheers for the feedback!
Jan.

Justin Israel

unread,
Apr 3, 2014, 4:26:36 PM4/3/14
to python_in...@googlegroups.com
Cool. Once you have something you feel would be good across multiple recent versions of Maya, feel free to submit a merge request on the repo: https://github.com/justinfx/MayaSublime

Thanks!


Fredrik Averpil

unread,
Apr 3, 2014, 4:36:36 PM4/3/14
to python_in...@googlegroups.com
Awesome!

This definitively should get merged with the repo!

// F

Jan:

unread,
Apr 4, 2014, 7:52:30 AM4/4/14
to python_in...@googlegroups.com
So I updated the script to only take global procs. (still a big file with a lot of commands tho)
So this auto completion file contains global procs only which should be more accurate. I decided to still add all scripts "global procs " as that way you would still get the commands like "stringArrayRemoveDuplicates" which are not listed in the standard maya documentation.

At the moment sublime does not have a way (that I know of ) to add comments inside the text editor. However if you are curious where the commands come from, I added the scripts path as a "comment" in the json MEL.sublime-completions file.

Also the script now has an additional argument (apiOnly : bool)  to only list the maya commands that can be found in the documentation.

Justin: Unfortunately I do not have a way to test this on Maya 2015 yet. As soon as I do I will generate a file for that and compare it for consistency.




--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
SublimeMelAutocompletion.py
MEL-sublime-completions.zip

Jan:

unread,
Apr 4, 2014, 11:28:14 AM4/4/14
to python_in...@googlegroups.com
*noticed that the attachments dont show up on the online archive so added them to my website.
Description:
http://www.janpijpers.com/mel-autocompletion-for-sublime-and-mayasublime/
Files:
http://www.janpijpers.com/wp-content/uploads/2014/04/SublimeAutoComplete.zip

Reply all
Reply to author
Forward
0 new messages