Download presentation
Presentation is loading. Please wait.
Published byAndrew Bryant Modified over 9 years ago
1
Mel & Hot Keys Review
2
What’s MEL? Maya Embedded Language Most of Maya's interface is built using MEL commands and scripts.
3
Why Use MEL? Bypass Maya's user interface, quickly create shortcuts, and access advanced features. Enter exact values for attributes, bypassing any restrictions to precision imposed by the interface. Customize the interface for specific scenes, changing default settings to settings you prefer for a particular project. Create MEL procedures and scripts that carry out custom modeling, animation, dynamics, and rendering tasks.
4
MEL in the Expression Editor translateY = ball.translateZ; Or ty = ball.tz; ball.tx = 5 * sin (time); tire.rz = - (tire.tx * (360.0 / (2 * 3.1415)));
5
MEL Scripts All MEL commands must terminate with a semicolon A MEL script file (*.mel) is a file that contains MEL commands, MEL procedures, or both. A MEL script is used to execute a sequence of commands. When you execute a MEL script, it does not become part of the scene; you must execute the script each time you want to repeat the action.
6
Where are the scripts? By default, Maya looks for your MEL scripts in your scripts directory. By default, this location is maya\6.0\scripts
7
Where is the Script Editor? Open by selecting Window > General Editors > Script Editor Click (the Script Editor icon) at the bottom right of the Maya window
8
Edit Commands in the Script Editor Win CmdMac CmdDescription Ctrl+cApple+c Copy Ctrl+xApple+x Cut Ctrl+vApple+v Paste Ctrl+aApple+a Select all the text in the edit box
9
Opening a script Opening a script doesn't execute it. It simply displays the script in the input section of the Script Editor. To execute some or all of a script displayed in the input section of the Script Editor, highlight it with your mouse press your keyboard's numeric Enter key.
10
Sourcing a script Sourcing a MEL script file executes all of the MEL commands and declares all global procedures that are contained within the script file. If you modify a procedure in a script file, Maya will not register the changes to that procedure until you source its script file. This is because Maya keeps executed procedures in memory.
11
Executing a script Enter the script name in the command input (bottom portion) of the Script Editor and do one of the following: press Ctrl + Enter press the Enter key on the numeric keypad select Edit > Execute from the Script Editor If no part of the MEL script definition fails, then the definition is moved from the bottom portion to the top portion of the Script Editor.
12
MEL Scripts All MEL commands must terminate with a semicolon A MEL script file (*.mel) is a file that contains MEL commands, MEL procedures, or both. A MEL script is used to execute a sequence of commands. When you execute a MEL script, it does not become part of the scene; you must execute the script each time you want to repeat the action.
13
time -A Predefined Variable in Maya NOTE: the following table assumes a frame rate of 24 fps. FrameTime (seconds) 00.0 10.0417 20.0833 30.125 241.0 24010.0
14
Sourcing a script When you source a global MEL script, global procedures are declared. If you declare a local procedure by entering it in the Script Editor or Command Line, the procedure is declared globally and you can execute it at any time.
15
Hotkeys If you use a menu selection frequently, you may want to assign it to a hotkey. You assign hotkeys in the Hotkey Editor (Window > Settings/Preferences > Hotkeys) window. You can assign hotkeys to your own MEL scripts or to commands that accompany plug-in software.
17
How Hotkeys Are Saved Maya saves your custom hotkey preferences so that they do not interfere with the default Maya hotkey settings. Your preferences will not be overwritten when you upgrade to the next Maya version. The file names containing hotkey preferences are userHotkeys.mel and userNamedCommands.mel under user prefs directory:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.