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:
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build_nodes.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index 0a5235a6d11..80961a687cd 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -778,6 +778,14 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
}
}
+ /* speed optimization for animation lookups */
+ if (ob->pose) {
+ BKE_pose_channels_hash_make(ob->pose);
+ if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
+ BKE_pose_update_constraint_flags(ob->pose);
+ }
+ }
+
/* Make sure pose is up-to-date with armature updates. */
add_operation_node(&arm->id,
DEPSNODE_TYPE_PARAMETERS,
@@ -872,6 +880,14 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *ob)
ID *obdata = (ID *)ob->data;
build_animdata(obdata);
+ BLI_assert(ob->pose != NULL);
+
+ /* speed optimization for animation lookups */
+ BKE_pose_channels_hash_make(ob->pose);
+ if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
+ BKE_pose_update_constraint_flags(ob->pose);
+ }
+
add_operation_node(&ob->id,
DEPSNODE_TYPE_EVAL_POSE,
DEPSOP_TYPE_INIT,