diff options
-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); |