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:
authorLukas Tönne <lukas.toenne@gmail.com>2016-04-25 16:38:50 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-04-25 16:41:03 +0300
commita10b2fefab71f6463a6f83df7c84242af6f2e9ab (patch)
treee281974a0593404a17d51f3779e2aedc0c7fe6fc /source/blender/depsgraph/intern/depsgraph_build_nodes.cc
parent3ac2028df0c4e6e30135b79537e3f0af8e59382f (diff)
Fix for missing pose bone hash in the new dependency graph.
The hash table is used to look up bone poses, particularly during constraint evaluation. Without this the default BLI_findstring method on a plain ListBase is used, which is really slow for extensive rigs.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build_nodes.cc')
-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,