Chapter 6. Variables and Data Types

In this chapter you will learn

  • How to declare variables and why it sometimes is not necessary.

  • What global and local variables are and how are they used.

  • How to choose between global variables, attributes, and option variables for storing data that must persist.

  • Which MEL commands can be used to read and set environment variables.

  • Why Maya distinguishes between different types of data in the MEL language.

  • What the different data types available in MEL are.

  • How to perform basic operations on data of each type.

  • How and why to convert data from one type to another.

  • The differences between integer and floating-point operations, and how they can surprise you.

  • The differences between arrays and vectors.

In the examples in

Get MEL Scripting for Maya Animators, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.