MEL Scripting for Maya Animators -  Chris Kazmier,  Mark R. Wilkins

MEL Scripting for Maya Animators (eBook)

eBook Download: PDF
2005 | 2. Auflage
552 Seiten
Elsevier Science (Verlag)
978-0-08-047071-9 (ISBN)
Systemvoraussetzungen
53,96 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
Trying to learn Maya programming from the documentation can be daunting whether or not you are a programmer. The first edition of MEL Scripting for Maya Animators earned the reputation as the best introductory book on MEL, Maya's scripting language. Now fully revised and updated, the second edition also includes new features, such as a discussion of global procedures, new chapters on fixing programming bottlenecks, advanced user interface techniques, and optimizing character rigs. New chapters on utility nodes and Maya's Web Panel feature provide new ideas on how to use MEL in applications.

This new edition has kept the popular style of the first edition that offered very clear explanations of programming concepts to those without programming experience. A generous collection of code examples and Maya scene files is included on the companion Web site. This is a book for animators, artists, game developers, visual effects developers, and technical directors who want to learn the fundamentals of Maya, how to automate tasks, personalize user interfaces, build custom tools, and solve problems with MEL.

* Fully updated with several new chapters.
* Profusely illustrated and includes a companion Web site with numerous code examples and scene files.
* The authors bring their extensive experience in professional production studios to provide expert guidance.
Trying to learn Maya programming from the documentation can be daunting whether or not you are a programmer. The first edition of MEL Scripting for Maya Animators earned the reputation as the best introductory book on MEL, Maya's scripting language. Now fully revised and updated, the second edition also includes new features, such as a discussion of global procedures, new chapters on fixing programming bottlenecks, advanced user interface techniques, and optimizing character rigs. New chapters on utility nodes and Maya's Web Panel feature provide new ideas on how to use MEL in applications. This new edition has kept the popular style of the first edition that offered very clear explanations of programming concepts to those without programming experience. A generous collection of code examples and Maya scene files is included on the companion Web site. This is a book for animators, artists, game developers, visual effects developers, and technical directors who want to learn the fundamentals of Maya, how to automate tasks, personalize user interfaces, build custom tools, and solve problems with MEL. - Fully updated with several new chapters- Profusely illustrated and includes a companion Web site with numerous code examples and scene files- The authors bring their extensive experience in professional production studios to provide expert guidance

Cover 1
About the Authors 9
Contents 10
Preface 18
1 Maya Under the Hood 20
In this chapter you will learn 20
Why Look Under the Hood? 20
The Dependency Graph, Attributes, and Connections 21
Example 1: Using the Hypergraph to Explore the Dependency Graph 27
Example 2: Exploring Transform and Shape Nodes, Instancing, and History 36
2 The Basics of MEL Commands 42
In this chapter you will learn 42
Can I Use MEL Without Scripting? 42
Command Line and Command Feedback Line 43
Command Shell 44
Script Editor 44
Script Editor Versus Command Shell 46
Script Editor’s Messages as MEL Code 46
Making a Shelf Button for a MEL Script 48
Saving a MEL Script 48
Seductive Dangers of the Status Message Area 49
The whatIs Command 50
Basic Structure of MEL Commands 51
Where to Find Information About Maya and MEL on the Internet 52
Newsgroups 53
How to Use MEL Scripts Found on the Internet 53
What to Remember About How to Use MEL Without Writing Scripts 54
3 Using Expressions 56
In this chapter you will learn 56
What Is an Expression? 56
How Does an Expression Work? 57
Equals Sign: Equality and Assignment 57
How Maya Implements Expressions 59
Is Maya’s Expression Language the Same as MEL? 60
When (and When Not) to Use an Expression 61
Defining Relationships Between Attributes 62
What Is Operator Precedence? 63
Walkthrough of Maya’s Expression Language 64
Definitions of Variables 65
Computing the Values of Attributes 68
Assigning Computed Values 68
Example 1: Eyes 69
4 Controlling Particles with Expressions 80
In this chapter you will learn 80
Two Kinds of Particle Object Attributes: Per Object and Per Particle 80
All About Vectors 81
Two Kinds of Expressions: Ordinary and Particle 87
Example 1: Ordinary Expressions and a Newton Field 87
Example 2: A Simple Particle Expression 92
Example 3: Helical Particles Around a Curve 99
5 Problem Solving with MEL Scripting 114
In this chapter you will learn 114
MEL’s Role in Maya: Building Scenes 114
Strategies for Planning MEL Applications 116
The Simplest User Interface 117
Creating, Editing, and Querying Nodes in MEL 119
Adding, Setting, and Getting Values of Attributes in MEL 120
Connecting Attributes in MEL 121
Creating and Connecting Expression Nodes in MEL 122
Example 1: Using MEL to Automate Setup for Spiral Particles 123
6 Variables and Data Types 134
In this chapter you will learn 134
Declaring Variables (and Not Declaring Them) 134
Environment Variables 140
MEL Statements and Type Checking 140
Simple and Aggregate Data Types 141
What to Remember About Variables and Data Types in MEL 153
7 Using MEL Commands 156
In this chapter you will learn 156
What Is a MEL Command? 156
Structure of a MEL Command 157
Using MEL Commands in MEL Scripts 160
Avoid Using MEL Commands in Expressions 162
What to Remember About Using MEL Commands 162
8 Manipulating Nodes in MEL 164
In this chapter you will learn 164
Using ls Command to Find Nodes by Name or Other Properties 164
Using Select Command to Manage Object Selection 167
Creating Nodes in a Maya Scene 169
Finding a Node’s Parents and Children 170
Finding Information on Node Connections 171
About Maya’s Node Types and the Node and Attribute Reference 172
What to Remember About Managing Nodes in MEL 173
9 Controlling the Flow of Execution 174
In this chapter you will learn 174
Controlling the Flow of Script Execution 174
Basic Conditional Operations: if-else and switch 176
Loops 186
What to Remember About Controlling the Flow ofExecution in MEL 189
10 Procedures and Functions 190
In this chapter you will learn 190
Top-Down Design 190
Example 1: A Trip to the Grocery Store 191
Example 2: Geometry-Constrained Locators 197
Example 3: Recursive Antenna 201
11 Naming Nodes, Scripts, and Variables 208
In this chapter you will learn 208
Why Naming Conventions Are Important 208
Naming Scripts 209
Naming Variables 210
Naming Nodes 211
Example 1: Adding a Name Prefix to Objects in a Hierarchy 214
Example 2: Changing Name Prefixes in a Hierarchy 216
12 Designing MEL User Interfaces 224
In this chapter you will learn 224
What Is a User Interface? 224
What Maya Users Expect to See from a MEL Script 225
Questions to Answer Before Designing a User Interface 227
Designing and Testing a User Interface 228
Structure of a Dialog Box 229
What to Remember About Designing User Interfaces in MEL 231
13 Simple MEL User Interfaces 232
In this chapter you will learn 232
Collecting Information from Users 232
Validating User Input: When and Why 233
Asking for Confirmation with confirmDialog 235
Asking User for Text String with promptDialog 236
Asking User to Pick File or Directory with fileDialog 237
Handling Warnings and Errors with Warning and ErrorCommands 238
Using Regular Expressions and match to Validate Data 238
How Regular Expressions Work 239
Validating Integers 241
Validating Floating-Point Numbers 242
Validating Object Names (Without Namespaces) 243
Example 1: Simple Dialogs and Input Validation 244
14 Custom Dialog Boxes 250
In this chapter you will learn 250
How to Structure a Script That Uses a Custom Dialog Box for Input 250
Dialog Boxes and Their Contents 251
Example 1: Making the Example Dialog Box 254
Example 2: Dialog Box for Making Geometric Primitives 271
15 Making Advanced Dialog Boxes with formLayout 278
In this chapter you will learn 278
Why Use formLayout? 278
Planning a Dialog Box for formLayout 279
Using formLayout: Overview 280
Using formLayout: Defining Placement Rulesfor UI Objects 283
Example: Implementing a Dialog Box with formLayout 285
16 Making Advanced Dialog Boxes with Web Panels 290
In this chapter you will learn 290
What You Need to Know Before You Proceed 290
What Are Web Panels? 291
Learning Web Authoring 292
How a Dialog Box Built with Web Panels Works 293
Planning a Dialog Box for Web Panels 294
Creating a Web-Based Dialog Box for Maya 294
Launching a Web-Based Dialog Box from MEL 297
Example 1: Implementing a Dialog Box using JavaScript 302
17 Improving Performance with Utility Nodes 314
In this chapter you will learn 314
What Is a Utility Node? 314
When Should You Consider Using a Utility Node? 315
How to Create and Connect a Utility Node 16
Example 1: Using the plusMinusAverage Node to Find the MidpointBetween Two Locators 319
18 Installing MEL Scripts 322
In this chapter you will learn 322
Installing a Script to Make It Available in All Scenes 322
Installing a Script to Run When Maya Starts 323
Installing a Script into a Script Node in a Scene 323
Installing Custom Menus 325
Managing Button Shelves and Creating Custom Shelf Icons 325
What to Remember About Installing MEL Scripts 326
19 Examples Using MEL with Particle Dynamics 328
Example 1: Introduction to Particle Goals 328
Example 2: Particle Goals on a Surface 334
Example 3: Using Goals on Multiple Surfaces 348
Example 4: Using Goals on Surfaces, Part 2 357
20 Examples Using MEL with Solid Body Dynamics 370
Example 1: Particle Collisions 370
Example 2: Collision Events 380
Example 3: Collisions Between Objects in Solid Dynamics 393
Example 4: Solid Dynamics and Particles 413
21 Example of a Simple Crowd System 428
Example 1: Creating a Vehicle 428
Example 2: Vehicle Interaction 443
Example 3: Vehicle Environment 456
Example 4: Fine Tuning and Completing the Script 468
22 Examples Using MEL in Character Rigging 504
Example 1: Character Controls 504
Example 2: Building a Character User Interface 518
Index 536

Erscheint lt. Verlag 23.8.2005
Sprache englisch
Themenwelt Sachbuch/Ratgeber
Informatik Grafik / Design Film- / Video-Bearbeitung
Informatik Grafik / Design Maya
Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
ISBN-10 0-08-047071-8 / 0080470718
ISBN-13 978-0-08-047071-9 / 9780080470719
Haben Sie eine Frage zum Produkt?
PDFPDF (Adobe DRM)

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
A comprehensive guide to designing modern, animated, and interactive …

von Joseph Labrecque

eBook Download (2023)
Packt Publishing (Verlag)
46,79