2009

Table Of Contents
Perform mathematical operations to modify the value of a variable.
Implement dynamics using MEL commands.
Before proceeding with the next lesson you may want to review the material
presented in this lesson so you are familiar with the concepts and skills
associated with them. Some suggested tasks you can try on your own include:
Practice creating, modifying and performing operations with variables. In
the next lesson, you use variables extensively to create a user interface.
Lesson 4: User interface creation and
procedures
Introduction
In this lesson, you create a user interface for an existing Maya procedure using
MEL scripting commands. You learn how to:
Create a simple window
Use conditional statements to check the existence of a window
Use a built-in Maya procedure
Link a procedure to a user interface
Creating a window
The first step in creating custom user interfaces is to create a window. This
window contains the elements of the user interface such as text, buttons and
other controls.
To create a window
1 Type the following commands into a MEL tab of the Script Editor.
window -resizeToFitChildren 1; showWindow;
A window appears.
624 | Chapter 13 Scripting in Maya