Page MenuHome

Fix: Allow evaluation of fcurves that have a driver
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Jan 29 2019, 12:44 PM.

Diff Detail

Repository
rB Blender

Event Timeline

The purpose of this assert is to ensure evaluate_fcurve_driver() is used for driver f-curves instead of evaluate_fcurve().

It was added in rB4e845e06704b: Py-Driver: add 'self' option, apparently because driver f-curves require extra parameters to be evaluated.

So I guess this is not quite the correct solution, but difficult to say what is without more context.

Driver-fcurve evaluation happens in two stages. First the driver is evaluated, and then the result is used as frame for the normal fcurve evaluation. However, when changing the fcurve of a driver-fcurve, the result of the driver is not needed, therefore the additional parameters are not needed as well.

Maybe a better solution is to create a new function like evaluate_fcurve_pure which does the same as evaluate_fcurve but without the assert. I don't have a better name for this function right now..

  • new function to evaluate the curve of an fcurve only

To replicate the issue I had, insert a keyframe in this graph (by pressing i):

This revision is now accepted and ready to land.Jan 30 2019, 6:40 PM
This revision was automatically updated to reflect the committed changes.