MEL Scripting for Maya Animators, 2/e (Paperback)
暫譯: Maya 動畫師的 MEL 腳本編寫,第二版 (平裝本)

Mark R. Wilkins, Chris Kazmier

  • 出版商: Morgan Kaufmann
  • 出版日期: 2005-07-01
  • 售價: $2,380
  • 貴賓價: 9.5$2,261
  • 語言: 英文
  • 頁數: 552
  • 裝訂: Paperback
  • ISBN: 0120887932
  • ISBN-13: 9780120887934
  • 相關分類: 3D建模 3D-modeling
  • 立即出貨 (庫存=1)

買這商品的人也買了...

相關主題

商品描述

Description:

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.

 

Table of Contents:

Preface
Special Acknowledgment

Chapter 1 Maya Under the Hood
In this chapter you will learn
Why Look Under the Hood?
The Dependency Graph, Attributes, and Connections
Example 1: Using the Hypergraph to Explore the Dependency Graph
Transform Hierarchy and Parent/Child Relationships
Examining the Hierarchy
Transform and Shape Nodes
Example 2: Exploring Transform and Shape Nodes, Instancing, and History
MEL and Maya’s User Interface
What to Remember About How Maya Works Behind the Scenes

Chapter 2 The Basics of MEL Commands
In this chapter you will learn
Can I Use MEL Without Scripting?
Command Line and Command Feedback Line
Command Shell
Script Editor
Script Editor Versus Command Shell
Script Editor’s Messages as MEL Code
Making a Shelf Button for a MEL Script
Saving a MEL Script
Seductive Dangers of the Status Message Area
The whatIs Command
Basic Structure of MEL Commands
Where to Find Information About Maya and MEL on the Internet Newsgroups
How to Use MEL Scripts Found on the Internet
What to Remember About How to Use MEL Without Writing Scripts

Chapter 3 Using Expressions
In this chapter you will learn
What Is an Expression?
How Does an Expression Work?
Equals Sign: Equality and Assignment
How Maya Implements Expressions
Is Maya’s Expression Language the Same as MEL?
When (and When Not) to Use an Expression
Defining Relationships Between Attributes
What Is Operator Precedence?
Walkthrough of Maya’s Expression Language
Definitions of Variables
Computing the Values of Attributes
Assigning Computed Values
Example 1: Eyes
Analyzing the Problem
Planning the Eyes’ Animation Controls
Writing the Expression
What to Remember About Using Expressions

Chapter 4 Controlling Particles with Expressions
In this chapter you will learn
Two Kinds of Particle Object Attributes: Per Object and Per Particle
All About Vectors
Two Kinds of Expressions: Ordinary and Particle
Example 1: Ordinary Expressions and a Newton Field
Example 2: A Simple Particle Expression
A Few Hints for Efficient Particle Expressions
Example 3: Helical Particles Around a Curve
What to Remember About Particle Expressions in Maya

Chapter 5 Problem Solving with MEL Scripting
In this chapter you will learn
MEL’s Role in Maya: Building Scenes
Strategies for Planning MEL Applications
The Simplest User Interface
Creating, Editing, and Querying Nodes in MEL
Adding, Setting, and Getting Values of Attributes in MEL
Connecting Attributes in MEL
Creating and Connecting Expression Nodes in MEL
Example 1: Using MEL to Automate Setup for Spiral Particles
What to Remember About Writing MEL Scripts

Chapter 6 Variables and Data Types
In this chapter you will learn
Declaring Variables (and Not Declaring Them)
Environment Variables
MEL Statements and Type Checking
Simple and Aggregate Data Types
What to Remember About Variables and Data Types in MEL

Chapter 7 Using MEL Commands
In this chapter you will learn
What Is a MEL Command?
Structure of a MEL Command
Using MEL Commands in MEL Scripts
Avoid Using MEL Commands in Expressions
What to Remember About Using MEL Commands

Chapter 8 Manipulating Nodes in MEL
In this chapter you will learn
Using ls Command to Find Nodes by Name or Other Properties
Using Select Command to Manage Object Selection
Creating Nodes in a Maya Scene
Finding a Node’s Parents and Children
Finding Information on Node Connections
About Maya’s Node Types and the Node and Attribute Reference
What to Remember About Managing Nodes in MEL

Chapter 9 Controlling the Flow of Execution
In this chapter you will learn
Controlling the Flow of Script Execution
Basic Conditional Operations: if-else and switch Loops
What to Remember About Controlling the Flow of Execution in MEL

Chapter 10 Procedures and Functions
In this chapter you will learn
Top-Down Design
Example 1: A Trip to the Grocery Store
What Are Procedures and Functions?
Example 2: Geometry-Constrained Locators
Example 3: Recursive Antenna
What to Remember About Procedures, Functions, and Top-Down Design in MEL

Chapter 11 Naming Nodes, Scripts, and Variables
In this chapter you will learn
Why Naming Conventions Are Important
Naming Scripts
Naming Variables
Naming Nodes
Example 1: Adding a Name Prefix to Objects in a Hierarchy
Example 2: Changing Name Prefixes in a Hierarchy
What Are Namespaces?
Strategies for Using Namespaces
What to Remember About Naming Scripts, Variables, and Nodes

Chapter 12 Designing MEL User Interfaces
In this chapter you will learn
What Is a User Interface?
What Maya Users Expect to See from a MEL Script
Questions to Answer Before Designing a User Interface
Designing and Testing a User Interface
Structure of a Dialog Box
What to Remember About Designing User Interfaces in MEL

Chapter 13 Simple MEL User Interfaces
In this chapter you will learn
Collecting Information from Users
Validating User Input: When and Why
Asking for Confirmation with confirmDialog
Asking User for Text String with promptDialog
Asking User to Pick File or Directory with fileDialog
Handling Warnings and Errors with Warning and Error Commands
Using Regular Expressions and match to Validate Data
How Regular Expressions Work
Validating Integers
Validating Floating-Point Numbers
Validating Object Names (Without Namespaces)
Example 1: Simple Dialogs and Input Validation
What to Remember About Simple MEL User Interfaces and Input Validation

Chapter 14 Custom Dialog Boxes
In this chapter you will learn
How to Structure a Script That Uses a Custom Dialog Box for Input
Dialog Boxes and Their Contents
Example 1: Making the Example Dialog Box
Common Types of Controls
Common Types of Layouts
Example 2: Dialog Box for Making Geometric Primitives
What to Remember About Building Custom Dialog Boxes in MEL

Chapter 15 Making Advanced Dialog Boxes with formLayout
In this chapter you will learn
Why Use formLayout?
Planning a Dialog Box for formLayout
Using formLayout: Overview
Using formLayout: Defining Placement Rules for UI Objects
Example: Implementing a Dialog Box with formLayout
What to Remember About Making Dialog Boxes with formLayout

Chapter 16 Making Advanced Dialog Boxes with Web Panels
In this chapter you will learn
What You Need to Know Before You Proceed
What Are Web Panels?
Learning Web Authoring
How a Dialog Box Built with Web Panels Works
Planning a Dialog Box for Web Panels
Creating a Web-Based Dialog Box for Maya
Launching a Web-Based Dialog Box from MEL
Example 1: Implementing a Dialog Box using JavaScript
Ideas for Dialog Boxes Built with Web Panels
What to Remember about Making Dialog Boxes with Web Panels

Chapter 17 Improving Performance With Utility Nodes
In this chapter you will learn
What Is a Utility Node?
When Should You Consider Using a Utility Node?
How to Create and Connect a Utility Node
Example 1: Using the plusMinusAverage node to find the midpoint between two locators
Common Utility Nodes
What to Remember About Improving Performance
With Utility Nodes

Chapter 18 Installing MEL Scripts
In this chapter you will learn
Installing a Script to Make It Available in All Scenes
Installing a Script to Run When Maya Starts
Installing a Script into a Script Node in a Scene
Installing Custom Menus
Managing Button Shelves and Creating Custom Shelf Icons
What to Remember About Installing MEL Scripts

Chapter 19 Examples Using MEL with Particle Dynamics
Example 1: Introduction to Particle Goals
Example 2: Particle Goals on a Surface
Example 3: Using Goals on Multiple Surfaces
Example 4: Using Goals on Surfaces, Part 2

Chapter 20 Examples Using MEL with Solid Body Dynamics
Example 1: Particle Collisions
Example 2: Collision Events
Example 3: Collisions Between Objects in Solid Dynamics
Example 4: Solid Dynamics and Particles

Chapter 21 Example of a Simple Crowd System
Example 1: Creating a Vehicle
Example 2: Vehicle Interaction
Example 3: Vehicle Environment
Example 4: Fine Tuning and Completing the Script
Full Script Reference: crowdSystem.mel

Chapter 22 Examples Using MEL in Character Rigging
Example 1: Character Controls
Example 2: Building a Character User Interface
Full Text of mrBlahControls.mel

Index

商品描述(中文翻譯)

描述:
從文檔中學習 Maya 程式設計可能會讓人感到畏懼,無論你是否是程式設計師。《MEL Scripting for Maya Animators》的第一版贏得了最佳入門書籍的聲譽,這本書介紹了 MEL,Maya 的腳本語言。現在,第二版已全面修訂和更新,還包括新功能,例如全球程序的討論、新章節關於修復程式設計瓶頸、高級用戶界面技術和優化角色裝置。關於實用節點和 Maya 的 Web Panel 功能的新章節提供了如何在應用中使用 MEL 的新思路。這一新版保持了第一版的受歡迎風格,為沒有程式設計經驗的人提供了非常清晰的程式設計概念解釋。隨書附贈的網站上還包含了大量的程式碼範例和 Maya 場景文件。這是一本針對動畫師、藝術家、遊戲開發者、視覺特效開發者和技術總監的書籍,旨在幫助他們學習 Maya 的基本知識、如何自動化任務、個性化用戶界面、構建自定義工具以及使用 MEL 解決問題。

目錄:
前言
特別感謝

第一章 Maya 的內部運作
在本章中你將學習
為什麼要了解內部運作?
依賴圖、屬性和連接
範例 1:使用超圖探索依賴圖
變換層級和父子關係
檢查層級
變換和形狀節點
範例 2:探索變換和形狀節點、實例化和歷史
MEL 和 Maya 的用戶界面
關於 Maya 背後運作的記憶要點

第二章 MEL 命令的基本知識
在本章中你將學習
我可以不使用腳本而使用 MEL 嗎?
命令行和命令反饋行
命令外殼
腳本編輯器
腳本編輯器與命令外殼的比較
腳本編輯器的消息作為 MEL 代碼
為 MEL 腳本製作一個工具欄按鈕
保存 MEL 腳本
狀態消息區的誘惑危險
whatIs 命令
MEL 命令的基本結構
在互聯網新聞組中查找有關 Maya 和 MEL 的信息
如何使用互聯網上找到的 MEL 腳本
關於如何在不編寫腳本的情況下使用 MEL 的記憶要點

第三章 使用表達式
在本章中你將學習
什麼是表達式?
表達式如何運作?
等號:相等和賦值
Maya 如何實現表達式
Maya 的表達式語言是否與 MEL 相同?
何時(以及何時不)使用表達式
定義屬性之間的關係
什麼是運算符優先級?
Maya 表達式語言的逐步講解
變數的定義
計算屬性的值
分配計算值
範例 1:眼睛
分析問題
規劃眼睛的動畫控制
編寫表達式
關於使用表達式的記憶要點

第四章 使用表達式控制粒子
在本章中你將學習
兩種粒子物件屬性:每個物件和每個粒子
有關向量的所有信息
兩種表達式:普通和粒子
範例 1:普通表達式和牛頓場
範例 2:簡單的粒子表達式
高效粒子表達式的一些提示
範例 3:沿曲線的螺旋粒子
關於 Maya 中粒子表達式的記憶要點

第五章 使用 MEL 腳本解決問題
在本章中你將學習
MEL 在 Maya 中的角色:構建場景
規劃 MEL 應用的策略
最簡單的用戶界面
在 MEL 中創建、編輯和查詢節點
在 MEL 中添加、設置和獲取屬性的值
在 MEL 中連接屬性
在 MEL 中創建和連接表達式節點
範例 1:使用 MEL 自動化螺旋粒子的設置
關於編寫 MEL 腳本的記憶要點

第六章 變數和數據類型
在本章中你將學習
聲明變數(以及不聲明變數)
環境變數
MEL 語句和類型檢查
簡單和聚合數據類型
關於 MEL 中變數和數據類型的記憶要點

第七章 使用 MEL 命令
在本章中你將學習
什麼是 MEL 命令?
MEL 命令的結構
在 MEL 腳本中使用 MEL 命令
避免在表達式中使用 MEL 命令
關於使用 MEL 命令的記憶要點

第八章 在 MEL 中操作節點
在本章中你將學習
使用 ls 命令按名稱或其他屬性查找節點
使用 Select 命令管理物件選擇
在 Maya 場景中創建節點
查找節點的父節點和子節點
查找有關節點連接的信息
有關 Maya 的節點類型及節點和屬性參考
關於在 MEL 中管理節點的記憶要點

第九章 控制執行流程
在本章中你將學習
控制腳本執行的流程
基本條件操作:if-else 和 switch 循環
關於在 MEL 中控制執行流程的記憶要點

第十章 程序和函數
在本章中你將學習
自上而下設計
範例 1:去雜貨店的旅行
什麼是程序和函數?
範例 2:幾何約束定位器
範例 3:遞歸天線
關於 MEL 中的程序、函數和自上而下設計的記憶要點

第十一章 命名節點、腳本和變數
在本章中你將學習
為什麼命名約定很重要
命名腳本
命名變數
命名節點
範例 1:為層級中的物件添加名稱前綴
範例 2:更改層級中的名稱前綴
什麼是命名空間?
使用命名空間的策略
關於命名腳本、變數和節點的記憶要點

第十二章 設計 MEL 用戶界面
在本章中你將學習
什麼是用戶界面?
Maya 用戶期望從 MEL 腳本中看到什麼
在設計用戶界面之前需要回答的問題
設計和測試用戶界面
對話框的結構
關於在 MEL 中設計用戶界面的記憶要點

第十三章 簡單的 MEL 用戶界面
在本章中你將學習
從用戶那裡收集信息
驗證用戶輸入:何時和為什麼
使用 confirmDialog 要求確認
使用 promptDialog 要求用戶輸入文本字符串
使用 fileDialog 要求用戶選擇文件或目錄
使用 Warning 和 Error 命令處理警告和錯誤
使用正則表達式和 match 驗證數據
正則表達式的工作原理
驗證整數
驗證浮點數
驗證物件名稱(不使用命名空間)
範例 1:簡單對話框和輸入驗證
關於簡單的 MEL 用戶界面和輸入驗證的記憶要點

第十四章 自定義對話框
在本章中你將學習
如何結構一個使用自定義對話框進行輸入的腳本
對話框及其內容
範例 1:製作示例對話框
常見的控制類型
常見的佈局類型
範例 2:製作幾何原始體的對話框
關於在 MEL 中構建自定義對話框的記憶要點

第十五章 使用 formLayout 製作高級對話框
在本章中你將學習
為什麼使用 formLayout?
為 formLayout 計劃對話框
使用 formLayout:概述
使用 formLayout:為 UI 物件定義放置規則
範例:使用 formLayout 實現對話框
關於使用 formLayout 製作對話框的記憶要點

第十六章 使用 Web Panels 製作高級對話框
在本章中你將學習
在繼續之前需要知道什麼
什麼是 Web Panels?
學習網頁編輯
使用 Web Panels 構建的對話框如何運作
為 Web Panels 計劃對話框
為 Maya 創建基於網頁的對話框
從 MEL 啟動基於網頁的對話框
範例 1:使用 JavaScript 實現對話框
使用 Web Panels 構建對話框的想法
關於使用 Web Panels 製作對話框的記憶要點

第十七章 使用實用節點提高性能
在本章中你將學習
什麼是實用節點?
何時應考慮使用實用節點?
如何創建和連接實用節點
範例 1:使用 plusMinusAverage 節點查找兩個定位器之間的中點
常見的實用節點
關於使用實用節點提高性能的記憶要點

第十八章 安裝 MEL 腳本
在本章中你將學習
安裝腳本以便在所有場景中可用
安裝腳本以便在 Maya 啟動時運行
將腳本安裝到場景中的腳本節點
安裝自定義菜單
管理按鈕工具欄和創建自定義工具欄圖標
關於安裝 MEL 腳本的記憶要點

第十九章 使用 MEL 與粒子動力學的範例
範例 1:粒子目標介紹
範例 2:表面上的粒子目標
範例 3:在多個表面上使用目標
範例 4:在表面上使用目標,第二部分

第二十章 使用 MEL 與固體動力學的範例
範例 1:粒子碰撞
範例 2:碰撞事件
範例 3:固體動力學中物體之間的碰撞
範例 4:固體動力學和粒子

第二十一章 簡單人群系統的範例
範例 1:創建一輛車
範例 2:車輛互動
範例 3:車輛環境
範例 4:微調和完成腳本
完整腳本參考:crowdSystem.mel

第二十二章 使用 MEL 進行角色裝置的範例
範例 1:角色控制
範例 2:構建角色用戶界面
mrBlahControls.mel 的完整文本

索引