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.
This commit is contained in:
		@@ -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 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user