[Bf-blender-cvs] [2a63ef0] master: Fix missing pose bone hash table in stub poses of action constraints.

Lukas Tönne noreply at git.blender.org
Tue Apr 26 14:20:17 CEST 2016


Commit: 2a63ef03f041cb02202f3be03b92abc11848b51c
Author: Lukas Tönne
Date:   Tue Apr 26 14:11:03 2016 +0200
Branches: master
https://developer.blender.org/rB2a63ef03f041cb02202f3be03b92abc11848b51c

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.

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

M	source/blender/blenkernel/intern/action.c

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

diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 3e1cf6a..5b1bb8c 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 */




More information about the Bf-blender-cvs mailing list