2009
Table Of Contents
- Contents
- Overview
- Maya Basics
- Polygonal Modeling
- Introduction
- Preparing for the lesson
- Lesson 1: Modeling a polygonal mesh
- Introduction
- Setting modeling preferences
- Using 2D reference images
- Creating a polygon primitive
- Modeling in shaded mode
- Model symmetry
- Selecting components by painting
- Selecting edge loops
- Editing components in the orthographic views
- Editing components in the perspective view
- Drawing a polygon
- Extruding polygon components
- Bridging between edges
- Adding polygons to a mesh
- Splitting polygon faces
- Terminating edge loops
- Deleting construction history
- Mirror copying a mesh
- Working with a smoothed mesh
- Creasing and hardening edges on a mesh
- Beyond the lesson
- NURBS Modeling
- Subdivision Surfaces
- Animation
- Introduction
- Preparing for the lessons
- Lesson 1: Keyframes and the Graph Editor
- Lesson 2: Set Driven Key
- Lesson 3: Path animation
- Lesson 4: Nonlinear animation with Trax
- Introduction
- Open the first scene for the lesson
- Creating clips with Trax
- Changing the position of clips with Trax
- Editing the animation of clips
- Reusing clips within Trax
- Soloing and muting tracks
- Scaling clips within Trax
- Open the second scene for the lesson
- Creating clips from motion capture data
- Extending the length of motion capture data
- Redirecting the motion within a clip
- Beyond the lesson
- Lesson 5: Inverse kinematics
- Introduction
- Open the scene for the lesson
- Understanding hierarchies
- Viewing hierarchies using the Hypergraph
- Creating a skeleton hierarchy
- Parenting a model into a skeleton hierarchy
- Applying IK to a skeleton hierarchy
- Creating a control object for an IK system
- Constraining an IK system
- Limiting the range of motion of an IK system
- Simplifying the display of a hierarchy
- Applying parent constraints on an IK system
- Planning an animation for an IK system
- Animating an IK system
- Beyond the lesson
- Character Setup
- Polygon Texturing
- Rendering
- Introduction
- Preparing for the lessons
- Lesson 1: Rendering a scene
- Introduction
- Open the scene for the lesson
- Creating shading materials for objects
- Refining shading materials for objects
- Maya renderers
- Rendering a single frame using IPR
- Rendering using the Maya software renderer
- Batch rendering a sequence of animation frames
- Viewing a sequence of rendered frames
- Beyond the lesson
- Lesson 2: Shading surfaces
- Lesson 3: Lights, shadows, and cameras
- Lesson 4: Global Illumination
- Lesson 5: Caustics
- Dynamics
- Painting
- Introduction
- Preparing for the lessons
- Lesson 1: Painting in 2D using Paint Effects
- Lesson 2: Painting in 3D using Paint Effects
- Introduction
- Preparing for the lessons
- Brushes and strokes
- Rendering Paint Effects strokes
- Paint Effects on 3D objects
- Creating a surface to paint on
- Painting on objects
- Using turbulence with brush stroke tubes
- Using additional preset brushes
- Mesh brushes
- Converting mesh strokes to polygons
- Modifying a converted polygonal mesh
- Beyond the lesson
- Lesson 3: Painting textures on surfaces
- Expressions
- Scripting in Maya
- Index
Every argument of the user interface is defined by querying the user
interface elements. The backslash at the end of a line allows the command
flag argument to span multiple lines.
Your user interface is now fully functional!
A completed version of the user interface script named Mel_UI_Final.mel is
available in the GettingStarted project directory (GettingStarted/mel).
Saving the script
To use your script in other scenes, you must save it. To execute the MEL
commands in a script file without having to open it every time you want to
use it, you must use global procedures.
Once you’ve saved a MEL script file that contains a global procedure in the
default script folder of Maya, you can access it whenever you type MEL
commands. Other procedures in the script file can only be called by the global
procedure(s) defined in the script file or other local procedures.
Maya automatically sources procedures in its default scripts folders at start
up. A script in the default Maya script folder has the same name as a global
procedure defined in the script file, when you type the name of the script file,
the global procedure within the script file will be executed. This allows you
to create scripts that operate similar to built-in Maya commands.
1 Type the following at the top of MEL2:
global proc makeRoll_create_UI() {
2 At the bottom of MEL2, type the following:
}
Your entire user interface script should be between the curly braces.
3 Highlight the entire script by selecting Edit > Select All from the Script
Editor menu bar.
4 With the script highlighted, save the script by selecting File > Save Script
from the Script Editor.
The Script Editor only saves the highlighted commands when saving a
script.
5 Save the script as makeRoll_create_UI.mel in the GettingStarted/mel
folder.
Saving the script | 641