Commit: 079a2a6a467fe94405aa75908952274bd7ce0a69
Author: Sergey Sharybin
Date:   Thu Feb 12 15:35:48 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB079a2a6a467fe94405aa75908952274bd7ce0a69

Depsgrpah: Proxy relations were still nto correct

Now linked objects which depend on individual armature bones will keep
working after creating the proxy.

===================================================================

M       source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
M       source/blender/depsgraph/intern/depsgraph_build_relations.cpp
M       source/blender/depsgraph/intern/depsnode_opcodes.h

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp 
b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index 21db0f0..baa5b83 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -656,9 +656,28 @@ void DepsgraphNodeBuilder::build_proxy_rig(Scene *scene, 
Object *ob)
 {
        add_operation_node(&ob->id,
                           DEPSNODE_TYPE_EVAL_POSE,
-                          DEPSOP_TYPE_EXEC,
+                          DEPSOP_TYPE_INIT,
                           function_bind(BKE_pose_eval_proxy_copy, _1, ob),
-                          DEG_OPCODE_POSE_PROXY_COPY);
+                          DEG_OPCODE_POSE_INIT);
+
+       for (bPoseChannel *pchan = (bPoseChannel *)ob->pose->chanbase.first;
+            pchan != NULL;
+            pchan = pchan->next)
+       {
+               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+                                  DEPSOP_TYPE_INIT, NULL,
+                                  DEG_OPCODE_BONE_READY);
+
+               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+                                  DEPSOP_TYPE_POST, NULL,
+                                  DEG_OPCODE_BONE_DONE);
+       }
+
+       add_operation_node(&ob->id,
+                          DEPSNODE_TYPE_EVAL_POSE,
+                          DEPSOP_TYPE_POST,
+                          NULL,
+                          DEG_OPCODE_POSE_DONE);
 }
 
 /* Shapekeys */
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp 
b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
index 0208066..ed44766 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
@@ -1298,6 +1298,18 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, 
Object *ob)
 
 void DepsgraphRelationBuilder::build_proxy_rig(Scene *scene, Object *ob)
 {
+       OperationKey pose_init_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, 
DEG_OPCODE_POSE_INIT);
+       OperationKey pose_done_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, 
DEG_OPCODE_POSE_DONE);
+       for (bPoseChannel *pchan = (bPoseChannel *)ob->pose->chanbase.first;
+            pchan != NULL;
+            pchan = pchan->next)
+       {
+               OperationKey bone_ready_key(&ob->id, DEPSNODE_TYPE_BONE, 
pchan->name, DEG_OPCODE_BONE_READY);
+               OperationKey bone_done_key(&ob->id, DEPSNODE_TYPE_BONE, 
pchan->name, DEG_OPCODE_BONE_DONE);
+               add_relation(pose_init_key, bone_ready_key, 
DEPSREL_TYPE_OPERATION, "Pose Init -> Bone Ready");
+               add_relation(bone_ready_key, bone_done_key, 
DEPSREL_TYPE_OPERATION, "Ready -> Done");
+               add_relation(bone_done_key, pose_done_key, 
DEPSREL_TYPE_OPERATION, "Bone Done -> Pose Done");
+       }
 }
 
 /* Shapekeys */
diff --git a/source/blender/depsgraph/intern/depsnode_opcodes.h 
b/source/blender/depsgraph/intern/depsnode_opcodes.h
index c05e9c5..ed0955e 100644
--- a/source/blender/depsgraph/intern/depsnode_opcodes.h
+++ b/source/blender/depsgraph/intern/depsnode_opcodes.h
@@ -111,9 +111,6 @@ DEF_DEG_OPCODE(POSE_DONE)
 DEF_DEG_OPCODE(POSE_IK_SOLVER)
 DEF_DEG_OPCODE(POSE_SPLINE_IK_SOLVER)
 
-/* Copy proxy eval result */
-DEF_DEG_OPCODE(POSE_PROXY_COPY)
-
 /* Bone -------------------------------------------- */
 
 /* Bone local transforms - Entrypoint */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to