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-26 15:11:03 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-04-26 15:16:28 +0300
commit2a63ef03f041cb02202f3be03b92abc11848b51c (patch)
tree0675bc2953fcbe71997ed61272f3c129efa2e086
parent5abae51a6ef5b0f1b817ef5ce4bff34fef5001cd (diff)
Fix missing pose bone hash table in stub poses of action constraints.
This is a follow-up fix for rBa10b2fe. The Action constraint uses a hackish stub object and pose, which doesn't have a hash table for fast lookups. This doesn't seem to be a big issue with the old depsgraph, but in the new depsgraph it creates a large number of cache misses and significant slowdown, possibly because of additional threading and less simple bone loops.
-rw-r--r--source/blender/blenkernel/intern/action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 3e1cf6a74a4..5b1bb8cb2bb 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1414,6 +1414,12 @@ void what_does_obaction(Object *ob, Object *workob, bPose *pose, bAction *act, c
workob->constraints.last = ob->constraints.last;
workob->pose = pose; /* need to set pose too, since this is used for both types of Action Constraint */
+ if (pose) {
+ BKE_pose_channels_hash_make(pose);
+ if (pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
+ BKE_pose_update_constraint_flags(pose);
+ }
+ }
BLI_strncpy(workob->parsubstr, ob->parsubstr, sizeof(workob->parsubstr));
BLI_strncpy(workob->id.name, "OB<ConstrWorkOb>", sizeof(workob->id.name)); /* we don't use real object name, otherwise RNA screws with the real thing */