diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-11 16:49:04 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-11 16:49:04 +0300 |
commit | 66b3f0b4d0743878e98f2ffcdfdfd81adfb99673 (patch) | |
tree | 787b7c5b24fbb5e87fd222b2699293c4fee3f671 /source/blender/depsgraph | |
parent | 2f0aca45966c3459a08f3f7e371ead764b19adfb (diff) |
Depsgraph: Fix redundant nodes built when animation shares same action
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 4 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 0545dd33a29..31a0e74b569 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -682,7 +682,9 @@ void DepsgraphNodeBuilder::build_animdata(ID *id) (void) add_id_node(id); ID *id_cow = get_cow_id(id); - if (adt->action != NULL) { + if (adt->action != NULL && + !built_map_.checkIsBuiltAndTag(&adt->action->id)) + { add_operation_node(&adt->action->id, DEG_NODE_TYPE_ANIMATION, NULL, DEG_OPCODE_ANIMATION); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 1663cce4904..4fdd2d48529 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -948,7 +948,9 @@ void DepsgraphRelationBuilder::build_animdata_curves(ID *id) TimeSourceKey time_src_key; add_relation(time_src_key, adt_key, "TimeSrc -> Animation"); /* Relation from action itself. */ - if (adt->action != NULL) { + if (adt->action != NULL && + !built_map_.checkIsBuiltAndTag(&adt->action->id)) + { ComponentKey action_key(&adt->action->id, DEG_NODE_TYPE_ANIMATION); add_relation(action_key, adt_key, "Action -> Animation"); } |