From fc1f5bded46afbb9b16fffe9e4c7f7c212566255 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 19 Jan 2020 12:44:34 +0300 Subject: Depsgraph: fix false positive time dependencies for simple drivers. The dependency graph has to know whether a driver must be re-evaluated every frame due to a dependency on the current frame number. For python drivers it was using a heuristic based on searching for certain sub- strings in the expression, notably including '('. When the expression is actually evaluated using Python, this can't be easily improved; however if the Simple Expression evaluator is used, this check can be done precisely by accessing the parsed data. Differential Revision: https://developer.blender.org/D6624 --- source/blender/blenkernel/BKE_fcurve.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_fcurve.h') diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 426e0ed4b0e..405b052f477 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -107,6 +107,7 @@ bool driver_get_variable_property(struct ChannelDriver *driver, int *r_index); bool BKE_driver_has_simple_expression(struct ChannelDriver *driver); +bool BKE_driver_expression_depends_on_time(struct ChannelDriver *driver); void BKE_driver_invalidate_expression(struct ChannelDriver *driver, bool expr_changed, bool varname_changed); -- cgit v1.2.3