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?
$\begingroup$
$\endgroup$
1
-
$\begingroup$ just a thought... have you tried 'var -1' $\endgroup$– MarcClintDionCommented Dec 27, 2014 at 5:51
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
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))