1

I've already got an answer of how to get evaluated keyframed property value but this doesn't work for drivers in the same way. I've tried to get it with

import bpy
ad = bpy.context.scene.animation_data
data_path = "my.path" # not the actual path, just an example
fdriver = [dr for dr in ad.drivers if dr.data_path = data_path][0]
value = fdriver.evaluate(10.0)

but it just returns the number of the frame I want to get evaluated value from. As I understand it takes driver's FCurve which can be found in Drivers Editor and which has nothing related to actual Driver value.

So the question is - is there a way to get evaluated driver value for the certain frame directly with the Blender API, or do I have to recreate all driver's behavior from its type, variables and expressions to get this value (it seems to be pretty hard to make it procedural because there may be so many variations of the settings)?

Andrey Sokolov
  • 1,111
  • 10
  • 25
  • 1
    AFAIK will need to change to the frame to get the value, making "recreating" unnecessary. – batFINGER Sep 04 '20 at 08:09
  • @batFINGER Thank you! I was afraid of it.) Iterating through frames by actually setting them significantly slows down performance (when you have to collect info for thousands subframes for example). Just hoped there was a way in API which I didn't see. – Andrey Sokolov Sep 04 '20 at 08:31

0 Answers0