4
$\begingroup$

In blender drivers, you can access a property value on the current frame through a var. How can a value on a past/previous frame be accessed?

$\endgroup$
  • $\begingroup$ just a thought... have you tried 'var -1' $\endgroup$ – MarcClintDion Dec 27 '14 at 5:51
1
$\begingroup$

In a scene with an animated plane (along x-axis), and a Cube with a driver added to z-rotation the following python snippet produces the same value as the default var in the driver. Where the evaluate function takes the frame as parameter.

import bpy

for fcurve in bpy.data.objects['Cube'].animation_data.drivers:
    print(fcurve.evaluate(54))

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.