Hey Polycounters
I recently was introduced to the world of Mel I was hoping someone could send me in the right direction to where I can find more tutorials. I've done a bunch of Google searches under the topic, but have come up short, most of the stuff online is Mel scripts tools that was created.
Any resources would be greatly appreciated.
Replies
I think the industry is moving more away from MEL and more to python/py-mel though knowing mel is always good.
I think most TD work is done in python now. but maya uses mel for its interface and scripts and mel is part of the core application. from what i understand python and pymel are just a wrapper to the c++ api and the mel commands.
but your going to find a huge amount of python tutorials books etc to learn.
http://download.autodesk.com/global/docs/maya2012/en_us/PyMel/index.html
anoter good thing to do is start reading scripts on creativecrash.com. most of the mel i know is from reading other peoples scripts.
also get the maya docs and maya api docs for c++ and python so yo can look up up function etc.
These directories are some of the best documentation you can have as a technical artist.
Open up the script editor and 90% of what is echoed will come from Maya's scripts.
Dissecting those scripts will give you more power under the hood even if yer final solution is python.
Although Python is extremly important. As long as MAYA is built on top of mel in this way: ( MEL KNOWLEDGE WILL ALWAYS BE EXTREMELY IMPORTANT! )
follow the action logic in the script editor echoes ( make sure you have "echo all" on when developing and off for performance )
Then use your editor's "find in files" function to search in those directories the relevant procedures.
I use to use Textpad for this. But for python and pymel a lot of people are using Eclipse. I find that Notepad++ is a hell of a lot faster than Textpad for searching:
Program Files\Autodesk\Maya2012\scripts
Almost instantaneous where Textpad would take about 25 seconds )
Even when you find the correct procedure that executes the action that was echoed you will most likely have "to follow the logic" across multiple scripts. which is often EXTREMELY illuminating.
Cross posting from another forum where the following user was using the scripteditor to make macros without referring to the actual logic in the mel files:
In which case...
Here is the suggested fix that examines maya's intrenal script's involved to find a real solution:
( this was back in 2007 maya 8.5 but I think the same echoes are relevant )
http://www.3dbuzz.com/vbforum/showthread.php?154052-Help-with-command-for-paint-selection-tool.
Hope that makes sense: ( Maya mel files are important sources of documentation )
if your just starting out and you have no experience with another language it will be much easier to get a intro to programming book for python or c. that will teach you the BASICS. starting from scratch. you really do need to do that before you jump into mel or pymel. your not going to find a textbook style book going over basic programming concepts in mel and pymel. most texts for maya assume you have a good grasp or programming and assume you just need to learn a new syntax. then they give non-trivial examples. interfaces, 3d math, writing function etc. thats above what you should get into until you get the basics down imo.
personally i like c. and for learning computer science and programming c is the way to go. stay away from java imo. there is a ton of good books on c. and stuff on the net.