Book Image

Maya Programming with Python Cookbook

By : Adrian Herbez
Book Image

Maya Programming with Python Cookbook

By: Adrian Herbez

Overview of this book

Maya is a 3D graphics and animation software, used to develop interactive 3D applications and games with stupendous visual effects. The Maya Programming with Python Cookbook is all about creating fast, powerful automation systems with minimum coding using Maya Python. With the help of insightful and essential recipes, this book will help you improve your modelling skills. Expand your development options and overcome scripting problems encountered whilst developing code in Maya. Right from the beginning, get solutions to complex development concerns faced when implementing as parts of build.
Table of Contents (17 chapters)
Maya Programming with Python Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Adding custom attributes and locking and hiding attributes


As you build up the rig for a model, it is often helpful to create custom attributes so that you can link things to forefingerRight.curl (for example), instead of forefingerRight.rotateZ. Not only will that make your rigs a great deal easier to understand, but it also allows you to tie actions of the rig to values that are completely independent of any built-in affects such as rotation or translation.

Just as there are sometimes attributes that you will want to add to a given node, there are often attributes on a node that you know you'll never want to animate. Locking such attributes and hiding them in the channel box is another way to make your rigs easier to work with.

In this example, we'll be looking at how to do both things—adding new, custom attributes to a node and hiding undesirable or unimportant attributes from view. More specifically, we'll be hiding the rotation and scale attributes and adding some attributes of the sort...