diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-08-23 13:12:25 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-08-23 13:23:25 +0300 |
commit | b88d8916e44f998c4f0bc397b29b0d6ff0f011e9 (patch) | |
tree | 120ce953eba0b4d7c1f78b17a40e17ed5ed9c9a1 /source/blender/depsgraph | |
parent | e7775833a78019a0e2e87feedf4ff3ec2620d4a8 (diff) |
Fix T45633 - Animated modifiers don't update in new depsgraph
* Resolved some todo's where FModifier paths were getting identified using the
wrong pattern.
* Added the missing animation -> modifier link. The "hacky" part here is just
to do with how we check if that link is needed; the link though should exist
in the graph.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build_relations.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc index 9bd448aa51c..649105a0df2 100644 --- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc +++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc @@ -1576,6 +1576,17 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje if (BKE_object_modifier_use_time(ob, md)) { TimeSourceKey time_src_key; add_relation(time_src_key, mod_key, DEPSREL_TYPE_TIME, "Time Source"); + + /* Hacky fix for T45633 (Animated modifiers aren't updated) + * + * This check works because BKE_object_modifier_use_time() tests + * for either the modifier needing time, or that it is animated. + */ + /* XXX: Remove this hack when these links are added as part of build_animdata() instead */ + if (modifier_dependsOnTime(md) == false) { + ComponentKey animation_key(&ob->id, DEPSNODE_TYPE_ANIMATION); + add_relation(animation_key, mod_key, DEPSREL_TYPE_OPERATION, "Modifier Animation"); + } } prev_mod_key = mod_key; |