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.
This commit is contained in:
2018-05-31 20:51:29 +02:00
parent 1bc801e020
commit bcbee4b9a3
2 changed files with 11 additions and 15 deletions

View File

@@ -502,10 +502,9 @@ void DepsgraphNodeBuilder::build_object(int base_index,
if (object->gpd != NULL) { if (object->gpd != NULL) {
build_gpencil(object->gpd); build_gpencil(object->gpd);
} }
/* Object that this is a proxy for. */ /* Proxy object to copy from. */
if (object->proxy) { if (object->proxy_from) {
object->proxy->proxy_from = object; build_object(-1, object->proxy_from, DEG_ID_LINKED_INDIRECTLY);
build_object(-1, object->proxy, DEG_ID_LINKED_INDIRECTLY);
} }
/* Object dupligroup. */ /* Object dupligroup. */
if (object->dup_group != NULL) { if (object->dup_group != NULL) {

View File

@@ -546,21 +546,18 @@ void DepsgraphRelationBuilder::build_object(Base *base, Object *object)
if (object->gpd != NULL) { if (object->gpd != NULL) {
build_gpencil(object->gpd); build_gpencil(object->gpd);
} }
/* Object that this is a proxy for. */ /* Proxy object to copy from. */
if (object->proxy != NULL) { if (object->proxy_from != NULL) {
object->proxy->proxy_from = object; build_object(NULL, object->proxy_from);
build_object(NULL, object->proxy); ComponentKey ob_pose_key(&object->proxy_from->id, DEG_NODE_TYPE_EVAL_POSE);
/* TODO(sergey): This is an inverted relation, matches old depsgraph ComponentKey proxy_pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE);
* 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);
add_relation(ob_pose_key, proxy_pose_key, "Proxy Pose"); add_relation(ob_pose_key, proxy_pose_key, "Proxy Pose");
ComponentKey ob_transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM); ComponentKey ob_transform_key(&object->proxy_from->id, DEG_NODE_TYPE_TRANSFORM);
ComponentKey proxy_transform_key(&object->proxy->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"); add_relation(ob_transform_key, proxy_transform_key, "Proxy Transform");
} }
/* Object dupligroup. */ /* Object dupligroup. */
if (object->dup_group != NULL) { if (object->dup_group != NULL) {
build_collection(object, object->dup_group); build_collection(object, object->dup_group);