diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-04 13:49:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-04 13:49:48 +0300 |
commit | fa11dc673074462e4cf24bf7aeb647cab07bd820 (patch) | |
tree | d984ecc7d23de19c7f0bda7467f36f4b1438d0fb /source/blender/depsgraph/intern | |
parent | b886cdf81d94edb62cac73578fa8ab9ede623452 (diff) |
Depsgraph: Fix extra operations and relations created for shared armatures
Diffstat (limited to 'source/blender/depsgraph/intern')
4 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_map.cc b/source/blender/depsgraph/intern/builder/deg_builder_map.cc index 67cb04d1b98..218483d1dc5 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_map.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_map.cc @@ -33,6 +33,8 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" +#include "DNA_ID.h" + namespace DEG { BuilderMap::BuilderMap() { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index 9cfe83e0087..5824858d7ed 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -150,7 +150,7 @@ void DepsgraphNodeBuilder::build_rig(Object *object) * Eventually, we need some type of proxy/isolation mechanism in-between here * to ensure that we can use same rig multiple times in same scene... */ - if (!built_map_.checkIsBuilt(arm)) { + if (!built_map_.checkIsBuiltAndTag(arm)) { build_animdata(&arm->id); /* Make sure pose is up-to-date with armature updates. */ add_operation_node(&arm->id, diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 066c9868876..2d1e1f289ea 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -509,7 +509,9 @@ void DepsgraphRelationBuilder::build_object_data(Object *object) } ID *obdata_id = (ID *)object->data; /* Object data animation. */ - build_animdata(obdata_id); + if (!built_map_.checkIsBuilt(obdata_id)) { + build_animdata(obdata_id); + } /* type-specific data. */ switch (object->type) { case OB_MESH: @@ -527,7 +529,7 @@ void DepsgraphRelationBuilder::build_object_data(Object *object) build_proxy_rig(object); } else { - build_rig(object); + build_rig(object); } break; case OB_LAMP: diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc index 2eee1671795..43df6d2a94b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc @@ -316,11 +316,13 @@ void DepsgraphRelationBuilder::build_rig(Object *object) add_relation(init_ik_key, flush_key, "Pose Init IK -> Pose Cleanup"); /* Make sure pose is up-to-date with armature updates. */ - OperationKey armature_key(&arm->id, - DEG_NODE_TYPE_PARAMETERS, - DEG_OPCODE_PLACEHOLDER, - "Armature Eval"); - add_relation(armature_key, init_key, "Data dependency"); + if (!built_map_.checkIsBuiltAndTag(arm)) { + OperationKey armature_key(&arm->id, + DEG_NODE_TYPE_PARAMETERS, + DEG_OPCODE_PLACEHOLDER, + "Armature Eval"); + add_relation(armature_key, init_key, "Data dependency"); + } /* IK Solvers... * - These require separate processing steps are pose-level |