diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-30 18:34:57 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-30 18:34:57 +0300 |
commit | 00bfca21780f69428ce042ca2a06524b6daf6c31 (patch) | |
tree | d80400b829385678be75f8c76dcef74511dffc08 /source/blender/depsgraph | |
parent | c1d6a26842aca53844aed99528c88320c10b56b5 (diff) |
Fix T45241: New depsgraph was lacking update of python drivers on time change
It's quite tricky to see if the driver actually depends on time or not,
so currently used approach when we'll be doing some extra updates.
This seems to correspond to how old depsgraph was dealing with this.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build_relations.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc index 2453701e664..8ee113ec341 100644 --- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc +++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc @@ -892,6 +892,15 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu) } DRIVER_TARGETS_LOOPER_END } + + /* It's quite tricky to detect if the driver actually depends on time or not, + * so for now we'll be quite conservative here about optimization and consider + * all python drivers to be depending on time. + */ + if (driver->type == DRIVER_TYPE_PYTHON) { + TimeSourceKey time_src_key; + add_relation(time_src_key, driver_key, DEPSREL_TYPE_TIME, "[TimeSrc -> Driver]"); + } } void DepsgraphRelationBuilder::build_world(World *world) |