Reddit Reddit reviews MEL Scripting for Maya Animators (The Morgan Kaufmann Series in Computer Graphics)

We found 2 Reddit comments about MEL Scripting for Maya Animators (The Morgan Kaufmann Series in Computer Graphics). Here are the top ones, ranked by their Reddit score.

Computers & Technology
Books
Computer Science
MEL Scripting for Maya Animators (The Morgan Kaufmann Series in Computer Graphics)
Check price on Amazon

2 Reddit comments about MEL Scripting for Maya Animators (The Morgan Kaufmann Series in Computer Graphics):

u/ccp_darwin · 4 pointsr/Music

Depends on the topic. My coauthor and I wrote the first edition of MEL Scripting for Maya Animators in about four or five months of weekends, and it's so far been in print for 13 years over two editions and made a decent profit for the publisher. Doing so relied on having a clear understanding in advance of the material presented in the text, and the task was a lot simpler than it would have been writing and editing, say, mathematical proofs or problem sets.

u/reed5point0 · 3 pointsr/Maya

HOLA!

First off I am going to praise my "MEL" mentor Chris Maraffi. If you learn best with a book, this is who you should look up. He is great, and I also heard he is a beastmode Dancer, his website only confirms it. It's great to have the author of the books you are assigned for a course to also be the instructor. It was one of the most detailed courses I have ever attended for both scripting and rigging.



Now all of Maya runs off MEL mostly, it's a lot like C but is also quite different. Here is a quick example of a really really basic Mel usage.


create a sphere


Open up the script editor (Its the most bottom right button on the Maya UI.)


Inside the script editor click History > Echo All Commands. This will show every command Maya parses. keep this window open, we will come back to it.


Now in the main Maya menus you want to do three things, Center Pivot, Freeze Transformations, and delete individual history for that sphere. You probably don't want Delete ALL History for your scene in this example.


Once you perform those three commands on the sphere go back to the script editor. You should see this:

>ModObjectsMenu MayaWindow|mainModifyMenu;


>CenterPivot;


>xform -cp;



>ModObjectsMenu MayaWindow|mainModifyMenu;


>FreezeTransformations;


>performFreezeTransformations(0);


>makeIdentity -apply true -t 1 -r 1 -s 1 -n 0 -pn 1;


>// Result: makeIdentity -apply true -t 1 -r 1 -s 1 -n 0 -pn 1 //


>buildEditMenu("MayaWindow|mainEditMenu");


>DeleteHistory;


>delete -ch;


>editMenuUpdate MayaWindow|mainEditMenu;


looks a bit intimidating to a noob possibly, but fear not we only want three lines...copy them and paste them in the bottom text box of the script editor give them each their own line (hit enter after each line).

xform -cp;


makeIdentity -apply true -t 1 -r 1 -s 1 -n 0 -pn 1;


delete -ch;


Got it? Man I hope I explained this all well enough..it's early.


Now highlight all three lines and MIDDLE MOUSE Drag the script into your shelf like so.

Example



Boom you now have a 1 button solution to center pivots freeze transforms and delete history using MEL.


That's as basic as it gets lol but it's a useful tool to have. But I mainly wanted to get you started in parsing MEL in a simple method. Get familiar with it, learn how to read it somewhat, and then I would start to get crazy with it.

I also second the other advice to learn Python along with it now that Maya supports it.

I also suggest this book.

Mel Scripting for Maya Animators