Page 1 of 1

Animating with Expressions like in AfterEffects

Posted: Tue Feb 19, 2013 8:02 pm
by Death111

I have some questions about the animation of some things:

1. I want to add a light, which blinks every 5 seconds for like 5 minutes.
I could make this with Keyframes and copy and paste them, but when i change FPS it wont match up. Or I want to change it to blink all 6 Seconds. I would need to change all Keyframes.
I already checked out the Action-Editor(NLA), which let me do this quite nice(with reapeat Option), but im wondering if there are other possibilities..

Im used to AfterEffects where i just write an expression:

Code: Select all

if(time%5 == 0) 

2. Another thing i want to do, when animating a car to drive on x-axis 500px, i want that an ParticleSystem, which is placed at the exhaust, to emit automatically more paricles when driving faster.

So my AE-Expression would look kinda like this:

Code: Select all

emitAmount = car.speed *10;
And it would work..

To summarize both questions: How can I use simple Expressions to change Values, based on other influences.

In Blender wiki i found ... ph/Drivers , which could be what i need, but its quite lot.

If you have any Tutorial about that or could explain to me how to do this, I'd be very happy :)

Posted: Wed Feb 20, 2013 5:12 pm
by stiv
Page status (reviewing guidelines)

Copy This page is a copy of the same page in 2.4 manual, need to be updated
That page is essentially from Old Blender (2.4x). I don't believe py drivers have been re-implemented in 2.6x yet, although there are plans...

Corrections welcome.

Note that you can use python scripts to move things around.

Posted: Wed Feb 20, 2013 5:23 pm
by CoDEmanX
you can use an app.handler for the frame_change_pre event and move objects around, or make them blink (if that blinking is somehow controllable via a property)

did you have a look at fcurve modifiers? maybe there's another way with it.