diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-31 21:51:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-01 13:00:11 +0300 |
commit | bcbee4b9a3537cce072509a3ec94d309eb1568cc (patch) | |
tree | 4da681c9f15e9194a65ab09a30a7757c804195ea | |
parent | 1bc801e02042b6170bb7758157d8bb1703286623 (diff) |
Fix missing animation updates when the proxy object is not visible.
The relation was inverted here, for a long time already. The reason is
unclear and in principle it should work fine in the right direction.
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 7 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 19 |
2 files changed, 11 insertions, 15 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 677dcfbfb8d..5867e278c78 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -502,10 +502,9 @@ void DepsgraphNodeBuilder::build_object(int base_index, if (object->gpd != NULL) { build_gpencil(object->gpd); } - /* Object that this is a proxy for. */ - if (object->proxy) { - object->proxy->proxy_from = object; - build_object(-1, object->proxy, DEG_ID_LINKED_INDIRECTLY); + /* Proxy object to copy from. */ + if (object->proxy_from) { + build_object(-1, object->proxy_from, DEG_ID_LINKED_INDIRECTLY); } /* Object dupligroup. */ if (object->dup_group != NULL) { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 5d0258ac2fe..d5ea8103742 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -546,21 +546,18 @@ void DepsgraphRelationBuilder::build_object(Base *base, Object *object) if (object->gpd != NULL) { build_gpencil(object->gpd); } - /* Object that this is a proxy for. */ - if (object->proxy != NULL) { - object->proxy->proxy_from = object; - build_object(NULL, object->proxy); - /* TODO(sergey): This is an inverted relation, matches old depsgraph - * behavior and need to be investigated if it still need to be inverted. - */ - ComponentKey ob_pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE); - ComponentKey proxy_pose_key(&object->proxy->id, DEG_NODE_TYPE_EVAL_POSE); + /* Proxy object to copy from. */ + if (object->proxy_from != NULL) { + build_object(NULL, object->proxy_from); + ComponentKey ob_pose_key(&object->proxy_from->id, DEG_NODE_TYPE_EVAL_POSE); + ComponentKey proxy_pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE); add_relation(ob_pose_key, proxy_pose_key, "Proxy Pose"); - ComponentKey ob_transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM); - ComponentKey proxy_transform_key(&object->proxy->id, DEG_NODE_TYPE_TRANSFORM); + ComponentKey ob_transform_key(&object->proxy_from->id, DEG_NODE_TYPE_TRANSFORM); + ComponentKey proxy_transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM); add_relation(ob_transform_key, proxy_transform_key, "Proxy Transform"); } + /* Object dupligroup. */ if (object->dup_group != NULL) { build_collection(object, object->dup_group); |