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:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user