Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc20
1 files changed, 15 insertions, 5 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 00d7a5da455..b1486e82af5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
@@ -161,7 +161,8 @@ void DepsgraphNodeBuilder::build_rig(Object *object)
build_armature(armature);
/* Rebuild pose if not up to date. */
if (object->pose == NULL || (object->pose->flag & POSE_RECALC)) {
- BKE_pose_rebuild(object, armature);
+ /* By definition, no need to tag depsgraph as dirty from here, so we can pass NULL bmain. */
+ BKE_pose_rebuild(NULL, object, armature, true);
/* XXX: Without this animation gets lost in certain circumstances
* after loading file. Need to investigate further since it does
* not happen with simple scenes..
@@ -313,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,
@@ -333,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();
@@ -348,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();
}