O'Reilly logo

Blender 2.49 Scripting by Michel J. Anders

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

Defining complex constraints

Where pydrivers enable us to drive the change of one IPOCurve by the change in another, PyConstraints provide us with ways to let object properties change only in a limited way.

Of course, Blender has many simple constraints predefined as we saw in previous sections and often a combination of simple constraints may be exactly what you want. But say you want your objects to move about freely within a non-rectangular area, for example to simplify the allowed placement of traffic lights and phone booths on a street grid. How would we achieve that? Enter pyconstraints.

PyConstraints are Python scripts that should be present as a text block in Blender's text editor and start with a comment line identifying it as a constraint: ...

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