Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating custom MEL scripts to help pose characters

From: Character Animation Fundamentals with Maya

Video: Creating custom MEL scripts to help pose characters

Before we actually get into posing and keyframing our characters I'd like to actually set up some custom functions that will help me along with this particular character. Now we're working with the simple character, but this will work really with any type of character you want. Maya is really great in that it allows you to create custom functions. You're probably already using them and these are just the standard shelves, and these are just actually custom buttons that Maya provides, and we can actually create our own by using a little bit of MEL scripting.

Creating custom MEL scripts to help pose characters

Before we actually get into posing and keyframing our characters I'd like to actually set up some custom functions that will help me along with this particular character. Now we're working with the simple character, but this will work really with any type of character you want. Maya is really great in that it allows you to create custom functions. You're probably already using them and these are just the standard shelves, and these are just actually custom buttons that Maya provides, and we can actually create our own by using a little bit of MEL scripting.

First of all, let's go into General Editors and go into what's called the Script Editor. And I'm going to go ahead and push this guy over so we can get everything here on the screen. This is a very tight screen here. What you can see is every time you do something in the character it shows up in this window. So for example if I select the root node of the character, it will say select HIPS. So what I can do is I can take all of these and make them into a button. So the first button that I want to create is one that selects all the parts of the character.

So all I'm going to do is just go into Select mode, and that's hitting the Q button, and then I'm just going to go through and select all of the various parts of the character. You can see how as I select them they show up here in the window. So I just want to go through and select each of the spines and the arms on both sides, the neck, the head, and then I also want to get the thumbs and the hands.

So I can just Shift+Select, rubber band select, all of these hands and all of these thumbs. Let's see if I can get this on the other side here. Now I'm not going to select the forward inverse kinematics at this point, so I don't really need to keyframe that. So now that I have all of these selected you can see I've got basically a list of what I've selected. This is where I'd deselected right before I started selecting everything and all of these are the selections of everything in the character.

So all I have to do is click and drag and highlight all of those commands. Then all I have to do is hit this button here. It says Save Script to Shelf, so I click on that and then I can just give it a name. Well, let's just call it Select All, and when I do that it gives me this. Do you want save it as a Python or MEL script? I'm going to choose MEL script and there we go. Now we have a button that will select everything in the character.

So if I deselect this, now I can select everything. Another nice little command that we can do is something that keyframes everything in the character. So all I have to do at this point is just hit the S key or if you go in Animation you just go Animation > Set Key. So I'm just going to ahead and set a key and watch what happens. It says it gives me a few little error messages, but this is the command that I want, setKeyframe, and it has keyframes for all of these things, and if you notice all of this is the names of everything that I had selected.

So I'm going to do the same thing. I'm going to Save Script to Shelf, and then I'm just going to call this one Key All. So this creates a keyframe for all of the major components of the character and we're going to save that as a MEL Script. So now I have two scripts here and these can be very, very handy. One selects everything in the character, the other keyframes everything in the character. So for example if I go out here and say frame 12 and I hit Key All and select something, you'll see that now I have-- In fact let's go ahead and Select All a keyframe here where I started and at frame 12.

Now this is very handy when you start creating stock poses or you want to lock in a character's pose. So we can refine this a little further. You can obviously create buttons for parts of the character. You can have one for the arms or one for the spine or the feet or whatever. We can also extend this in more complex characters to keyframe everything in the face for example. So create some custom shelves for your character and that will help you in the future when you're keyframing that character.

Show transcript

This video is part of

Image for Character Animation Fundamentals with Maya
Character Animation Fundamentals with Maya

65 video lessons · 10453 viewers

George Maestri
Author

 
Expand all | Collapse all
  1. 22m 18s
    1. Introduction
      1m 10s
    2. Using the exercise files
      1m 8s
    3. Character rig overview: Simple character
      6m 19s
    4. Character rig overview: Full character
      7m 30s
    5. Using other rigs
      48s
    6. Using screen drawing tools for Windows
      3m 9s
    7. Using screen drawing tools for the Mac
      2m 14s
  2. 23m 47s
    1. Creating strong poses
      3m 27s
    2. Creating custom MEL scripts to help pose characters
      4m 39s
    3. Using layers to select characters
      1m 10s
    4. Learning the basics of posing characters
      10m 7s
    5. Creating stock poses
      4m 24s
  3. 25m 11s
    1. Understanding forces and character motion
      2m 13s
    2. Understanding drag
      5m 51s
    3. Working with secondary motion
      5m 33s
    4. Bringing the character to life
      4m 21s
    5. Refining the animation
      7m 13s
  4. 39m 30s
    1. Keyframing initial poses
      4m 21s
    2. Creating the blocking pass
      7m 42s
    3. Moving holds
      5m 27s
    4. Animating weight shift
      4m 21s
    5. Animating pose to pose transitions
      7m 46s
    6. Animating a wave
      9m 53s
  5. 42m 15s
    1. Analyzing a walk
      5m 43s
    2. Setting up a character for a basic walk
      1m 22s
    3. Animating a walk: The feet
      5m 55s
    4. Animating a walk: The lower body
      8m 23s
    5. Animating a walk: Making the cycle symmetrical
      3m 10s
    6. Animating a walk: Working with the spine
      5m 59s
    7. Animating a walk: Arm motion
      7m 28s
    8. Animating a walk: The head
      4m 15s
  6. 24m 15s
    1. The importance of the passing position
      4m 52s
    2. Working with foot placement
      3m 50s
    3. Adding character to a walk: Contact position
      5m 10s
    4. Adding character to a walk: Passing position
      3m 20s
    5. Adding character to a walk: Finalizing
      7m 3s
  7. 52m 27s
    1. A run in four poses
      2m 39s
    2. Animating a run: The first pose
      4m 31s
    3. Animating a run: The second pose
      7m 17s
    4. Animating a run: Mirroring the basic poses
      10m 59s
    5. Animating a run: Hip and foot motion
      5m 12s
    6. Animating a run: The upper body
      5m 2s
    7. Animating a run: Left arm motion
      5m 31s
    8. Animating a run: Right arm motion
      4m 39s
    9. Animating a run: Cycling the animation
      6m 37s
  8. 1h 20m
    1. Animating blinks
      7m 56s
    2. Animating changes in eye direction
      5m 6s
    3. Animating a head turn
      4m 35s
    4. Working with audio
      3m 38s
    5. Overview of mouth controls
      2m 44s
    6. Animating vowels
      15m 14s
    7. Animating consonants: B, D, and G
      7m 2s
    8. Animating consonants: F, M, and S
      8m 22s
    9. Animating lip sync: Assigning phonemes
      10m 43s
    10. Animating lip sync: The head
      9m 44s
    11. Animating lip sync: The body
      5m 10s
  9. 55m 55s
    1. Creating the main poses
      4m 18s
    2. Blocking poses to dialogue
      7m 1s
    3. In-between blocking pass
      3m 27s
    4. Animating moving holds
      5m 19s
    5. Creating weight
      6m 19s
    6. Adding secondary motion
      10m 0s
    7. Animating dialogue
      8m 12s
    8. Finalizing the animation
      11m 19s
  10. 24s
    1. Goodbye
      24s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Character Animation Fundamentals with Maya.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.