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

Using shading nodes for non-shading tasks


One of the really great things about the various nodes that Maya provides is that there are very few limits on how you use them. To Maya, all nodes are just collections of functionality with certain inputs and outputs, and as long as the type of data lines up, it doesn't really care how you connect them.

This means that it's completely possible (and often very useful) to use hypershade nodes for tasks that aren't related to creating shading networks. In this example, we'll be doing just that using a plus/minus/average utility node to set the position of a given object to the average position of a number of others. This could be used, for example, to ensure that the pelvis of a character always stays centered in between the IK handles controlling its feet.

Using utility nodes can be used for tasks where you might otherwise write an expression, but with the added benefit that they update constantly, not just while the playback head is moving.

Getting...