• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Workflow Enhancements

This book has made custom hotkeys an integral part of the tutorials for good reason. Beginners who are not exposed to this workflow enhancement, as well as marking menus, are missing a big part of what makes Maya so efficient. However, the marking menus and hotkeys were created to show you how to determine the tasks you perform most often and set up tools to speed or automate many of them.

Tutorial: Building a Marking Menu

Choose Window | Settings/Preferences | Marking Menus. In the Marking Menus dialog box that opens, click the Create Marking Menu button to open the dialog box, as shown in Figure 16.3.

Figure 16.3. Maya's Edit Marking Menu dialog box.

On the DVD


Each of the nine light-gray squares represents a location on the marking menu that you attach to a function. You can add information to each block or edit it by right-clicking on one of the squares and choosing Edit Menu Item. This brings up a spot to insert MELscript, but don't panic! You're going to let Maya automatically create the MELscript you need to dump into those little boxes. The MELscript appears in the Script Editor as you use Maya, translating each of your actions into the equivalent MEL code.

Open the Script Editor by clicking the button to the far right of the Command Line.

On the Script Editor's menu, enable the Echo All Commands setting (Script | Echo All Commands).


Remember: When you turn on Echo All Commands, you can see every script and action that Maya runs with MEL. By default, the Script Editor echoes only the most significant commands for feedback in Maya's Command Line. Maya is built on MEL, so every action you perform in Maya is carried out in this scripting language. By watching the commands in the Script Editor, you can begin to grasp how Maya works and absorb the MEL syntax.

Your screen might be cluttered with all these windows open, so rearrange the Edit Marking Menu dialog box and Script Editor so that you can see both. Just drag and resize the windows until you have them arranged to your liking so that you can continue working efficiently.


If your Script Editor is filled with information you don't need, you can always clear its display by clicking Edit | Clear History on the Script Editor's menu.

The following steps create a CV Curve marking menu. For each function you add to the marking menu, you perform the function first, and then MMB-drag the MELscript from the Script Editor to one of the gray squares in the Edit Marking Menu dialog box.

First, access the CV Curve tool by clicking Create | CV Curve Tool in the Hotbox.

Check the new information in the Script Editor. Each line shows a different command, so you need to figure out which one actually runs the CV Curve tool. In this case, the line is CVCurveTool;, so highlight that line in the Script Editor (see Figure 16.4). Then, simply MMB-click over the highlighted text and drag it to the left-center gray box in the Edit Marking Menu dialog box. Maya automatically copies the necessary information to the box.

Figure 16.4. Highlighting the correct command in the Script Editor.


There's another method for copying MELscript: Copy the highlighted text (hotkey: Ctrl+c) in the Script Editor, right-click on one of the gray boxes in the Edit Marking Menu dialog box, and click Edit Menu Item on the shortcut menu. In the dialog box that opens, create a new menu item by pasting (hotkey: Ctrl+v) the code line in the text box right under the label Command(s).

Here's another method some Mayans prefer: Tear off the Create menu. Ctrl+Alt+Shift+click on a command, and it's added to the Shelf, complete with its icon. Finally, MMB-drag the new icon to your marking menu to add it.

In the Edit Marking Menu dialog box, right-click on the left-center gray box and choose Edit Menu Item from the shortcut menu. The Edit West dialog box opens; it's called “West” because the gray boxes are named after compass points.

You need to give the menu item a label that appears when you access this marking menu. In the Label text box in the Edit West dialog box, change the name to CV Curve.

Now, you need to enable the option box to appear beside the CV Curve item in the marking menu. To do that, select the Option Box check box near the bottom of the dialog box.

Tell the option box what to do when clicked. First, copy the code line from the Command(s) section and paste it in the Option Box Command(s) section. For most creation procedures in MELscript, all you have to do is add the word Options to the end of the standard command. In this case, the command name should be CVCurveToolOptions; (see Figure 16.5). The semicolons are critical, so make sure they don't get omitted. Also, remember that you must match the letter case exactly when entering command names because MELscript is case sensitive.

Figure 16.5. The completed Edit West dialog box.

You've finished creating the Create CV Curve item for this marking menu. Click the Save and Close button to save your changes and close the Edit West dialog box. Make sure the Edit Marking Menu dialog box is still open for the next task.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint