Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

PyDrivers at Last!

17

IposThis one was really an unexpected surprise; those of you guys who follow the development related mailing lists (Bf-committers and Bf-blender-cvs) know that the end of the Orange "affair" and the discussions about this year's Google Summer of Code proposal made the development slow down considerably, in this fermenting scene nearly noone noticed two small commitments from Ianwill (aka William Padovani Germano) which make the PyDrivers dream come true.

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 ;-)

17 Comments

  1. I know some python and understand some of those commands, and i'd have to say taht having direct control over the IPO system seems to be one huge advantage over animation.

    Also, in the new CVS build, the LSCM wrapper is considerably better.

  2. You can do the what now?

    Only kidding, yea that sounds really cool, gonna have to start learning Python, though my rusty C++ skills should help somewhat. :)

  3. I am really glad to see this. I haven't tested this, but Lox might know - will expressions like "cone.RotY = cube.LocX * 8" be allowed or am I misinterpreting the examples above?

  4. I'm familiar with python, its just the ipo drivers i'm not so familiar with! - blender development goes too fast for me to keep up, I still havn't got over 240/241 doh! :0

  5. What can be done with this?

    I have zero programming knowledge, but I am curoius what this is capable of.
    I'm decent in modeling, animation, ipo's, etc, but no python or programming languages.
    Will this be of any value to me if I don't know these languages?

    I'm hoping someone can explain this to me in a way that my non-programmer mind will understand.
    I'm sure I am not the only one curoius about this.

    Thanks for any information.

    Matt

  6. I'm guessing next step is to have an interface that creates py from english commands and gui.

    Map Object [name button] Location popup [X,Y,Z] > Blender.Object.Get (’[name button]’).getLocation()([X,Y,Z])

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×