PyDrivers at Last!

But what are PyDrivers all about? From the wiki related entry:

Pydrivers allow to use one-line Python expressions as input for a channel, instead of using a property of another object, like normal ipo drivers do; an expression in programming is any combination of symbols that can be evaluated to a definite value.

There are text input boxes where you can type expressions in Python, here are some examples of valid expressions:

  • any real value: 1.0
  • expressions with numbers and operators: 4.5 + 8.9 * 7.0 - (2 / 3.0)
  • expressions also with variables: math.pi * 2 + 5.0
  • available data: Blender.Get("curframe") # the current animation frame
  • a little math: math.sin(Blender.Get("curframe")) # the sine of the current frame!?

To take your hands on this programming goodness all you need is some Python knowledge and a fresh CVS build. As always, remember to give some feedback on any bug/strange behaviour you’ll discover during your tests on the Bf-committers list ;-)

Advertisement