Description
Course info
Level
Beginner
Updated
May 7, 2009
Duration
2h 50m
Description

Boost your productivity and learn MEL in over 2.5 hours of interactive training. Perfect for new and beginning users. Popular highlights include: Overview of MEL; MEL Commands; Controlling and Adjusting Attributes; Flow of Execution; Loops; Variable & Data Types; MEL Interfaces; Custom Shader Networks. Software required: Maya 6 or higher

About the author
About the author

Digital-Tutors author.

More from the author
CG101: Animation
Beginner
1h 4m
Apr 20, 2012
CG101: Graphic Design
Beginner
16m
Apr 16, 2012
CG101: General 3D Terminology
Beginner
22m
Apr 16, 2012
More courses by Papa Georgio
Section Introduction Transcripts
Section Introduction Transcripts

Introduction and Project Overview
Welcome to the Digital-Tutors MEL Basics Training Kit. In this series of tutorials, I'm going to walk you through how to write your own MEL scripts, how to work with variables, how to create a user interface. Remember, this is a basics kit, so my goal is to help you learn about MEL, expose you to MEL, and give you a couple of practical things that you could use in your own projects. Let's get started with our interface. This is how I have the interface set up. Over here, you've got your basic my window. My Outliner is set up over here, so we can see nodes when they're created. And now, I've got the script editor open. The script editor is this button right here. So, when you click that, it'll open up the script editor. Now, this is the layout that I prefer working in, that way I can type my script and check it over here. Later on, we're going to open up a program called EditPlus, which we'll cover the whole screen with and type our code there. And you'll see why it's easier to use the code. Now, you could input your scripts into three different areas. Down here, this is the Command Line, okay? So, we can type in "sphere, " hit Enter, and you notice, in your scene here, we now have a sphere. okay? And that's a NURBS sphere. And over here, you can see what it did. It wrote "sphere" up here; it said, "Okay, I went ahead and made you two nodes, "a NURBS sphere and a make NURBS sphere. " Okay, we'll just delete that. You could also come over here, and type in "sphere. " But when you hit Enter, nothing happens. That's because, the Enter on your keyboard part only gives it a line break. So you can see here how I've entered and put some space in. If you want to execute this code, there's one of two ways you can do this. You can hit the Enter key on your keypad, and you notice it executed the code, and it gave you a result. Now let me delete that. You could also type in "sphere, " and you'll notice this semicolon here, I'll get to that in just a second. Look what happened when I hit Enter on my keypad. This command disappeared; it got put up in here into the history area. So, we don't want to do that; let's say we want to keep typing on it. Sphere. I'll highlight it, okay? And now I'll press Enter. When I do that, it leaves the commands here, right? Leaves my scripts here, but executes 'em. Now, let's say you're not used to using your keypad, or may you're on a laptop, it's very difficult to get a keypad. Well, the other option that you have is to either highlight your script, or have your mouse in this area selected, and you can press Control + Enter on your keyboard, and that will run the command for you also. So here we have two of 'em. Okay, and it also works the same way if you type in "sphere, " highlight it, I like the shortcut Control + A, so very similar to the other Windows applications or Macintosh applications, and then you can press Control + Enter, and there it is. It will execute that for you. So, easy ways to get your scripts to work. There's also, let's go up here, to our general editor Command Shell, so there's this command shell here available to us too. Well, we could type in, "sphere, " hit Enter, it does it. I can press Up on my keyboard, and it will go, cycle through the commands. So, you know, there's a couple of advantages to using these, but we're going to focus primarily on the script editor, alright? That's going to give us the most flexibility while working. Now, the major thing that you're going to run into is syntax; that's the hardest thing for new users, especially non-programmers, to learn about programming, syntax. We're going to cover that in the next lesson.