diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-31 14:23:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-31 14:24:57 +0300 |
commit | bb7b1cc884819d2a681f1c93b6bb9c015248aff0 (patch) | |
tree | acf6bb83b38980fd970275a9fd9375ba784ef4c9 /source/blender/depsgraph | |
parent | 7a91ae110397c29a5bb63ed0489d67acdc11ecb4 (diff) |
Fix T56170: Fake dependency cycle in new depsgraph + interleaved armature update + proxy
Make proxy copy result more atomic operation.
Diffstat (limited to 'source/blender/depsgraph')
3 files changed, 22 insertions, 8 deletions
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 88996dc1f56..b1486e82af5 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -314,12 +314,13 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *object) } op_node = add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, - function_bind(BKE_pose_eval_proxy_copy, + function_bind(BKE_pose_eval_proxy_pose_init, _1, object_cow), DEG_OPCODE_POSE_INIT); op_node->set_as_entry(); + int pchan_index = 0; LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) { op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE, @@ -334,10 +335,14 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *object) NULL, DEG_OPCODE_BONE_READY); /* Bone is fully evaluated. */ - op_node = add_operation_node(&object->id, + op_node = add_operation_node( + &object->id, DEG_NODE_TYPE_BONE, pchan->name, - NULL, + function_bind(BKE_pose_eval_proxy_copy_bone, + _1, + object_cow, + pchan_index), DEG_OPCODE_BONE_DONE); op_node->set_as_exit(); @@ -349,10 +354,14 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *object) DEG_OPCODE_PARAMETERS_EVAL, pchan->name); } + + pchan_index++; } op_node = add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, - NULL, + function_bind(BKE_pose_eval_proxy_pose_done, + _1, + object_cow), DEG_OPCODE_POSE_DONE); op_node->set_as_exit(); } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 1d01b3e987b..4f94066f3bb 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -587,10 +587,6 @@ void DepsgraphRelationBuilder::build_object(Base *base, Object *object) /* 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->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"); 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 eaa17d27ffc..811986ea0e8 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc @@ -469,11 +469,20 @@ void DepsgraphRelationBuilder::build_proxy_rig(Object *object) DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE); + OperationKey from_bone_done_key(&proxy_from->id, + DEG_NODE_TYPE_BONE, + pchan->name, + DEG_OPCODE_BONE_DONE); add_relation(pose_init_key, bone_local_key, "Pose Init -> Bone Local"); add_relation(bone_local_key, bone_ready_key, "Local -> Ready"); add_relation(bone_ready_key, bone_done_key, "Ready -> Done"); add_relation(bone_done_key, pose_done_key, "Bone Done -> Pose Done"); + /* Make sure bone in the proxy is not done before it's FROM is done. */ + add_relation(from_bone_done_key, + bone_done_key, + "From Bone Done -> Pose Done"); + if (pchan->prop != NULL) { OperationKey bone_parameters(&object->id, DEG_NODE_TYPE_PARAMETERS, |