O'Reilly logo

MEL Scripting for Maya Animators, 2nd Edition by Mark R. Wilkins, Chris Kazmier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Controlling the Flow of Execution

In this chapter you will learn

  • What it means to control the flow of execution.

  • How conditional operations work.

  • How if/then/else statements work.

  • How switch statements work.

  • How tests work.

  • About loops, including for, for-in, and while loops.

Controlling the Flow of Script Execution

Most of the scripts discussed this far have run from beginning to end. However, many useful scripts either need to do something repeatedly or do certain things only if certain preconditions are satisfied. When a part of your script should only be run if certain conditions have been met, you can use a feature of MEL called a conditional operation to allow your script to decide whether to run that code.

When a part of your script should ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required