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

Advanced MEL Controls

In this section, you learn how to create more advanced MEL controls and layouts that maximize efficiency and conserve space. Techniques such as naming and referencing MEL controls, using variables, and creating multipanel layouts are covered in detail.

Naming and Referencing Controls

So far in this chapter, you have not been naming any of your MEL controls. A name for a control differs from a label or title. All controls are assigned unique names when you create them so that Maya can keep track of them. If you don’t specify a name, Maya names the control for you, and you may not be aware of what that name is. In many cases when using MEL for character controls, this is fine. If you need to reference a control with another command in your script, however, you must know its name. In this case, it is best to assign a name by specifying it at the end of the command that creates the control. Just write a name after all the flags, right before the semicolon. To name your window, for instance, write it like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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