Book Image

Practical Maya Programming with Python

By : Robert Galanakis
Book Image

Practical Maya Programming with Python

By: Robert Galanakis

Overview of this book

Table of Contents (17 chapters)
Practical Maya Programming with Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating the denormalized_skin context manager


In this and proceeding sections, we'll build a context manager that will temporarily denormalize a skin cluster.

Most skin clusters are normalized and support a limited number of influences. A skin is normalized when the sum of all influence weights equals 1.0 for each vertex. This ensures the skin deforms in a predictable way. Limiting the number of vertex influences is generally useful when doing things like painting skin weights. It can also be a technical constraint (for example in the case of many video games), or a useful way to simplify the skinning process (you don't need to worry about culling low influences repeatedly).

Even though normalized skin and limited influences are useful for interactive work, they can be a pain for scripting. Sometimes we want to set the values of influences explicitly, and normalize and cull influences at the end. We will build a context manager to facilitate this.

The lessons here can be applied to wherever...