5
$\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$
1
  • $\begingroup$ just a thought... have you tried 'var -1' $\endgroup$ Commented Dec 27, 2014 at 5:51

1 Answer 1

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

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .