From 5cd85ed57ea649c58c7c19d709bfc4cae7fffcad Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 19 Feb 2012 11:09:44 +0000 Subject: More pose armature code factorization: * New armature_mat_bone_to_pose, which is just the reverse of armature_mat_pose_to_bone (currently used by armature evaluation code only, but might be used by constraints space conversion code too, see note below). * Found another place where another (a bit erroneous) pose_to_bone code existed (apply_targetless_ik(), in transform_conversion.c, used by "auto ik" option), replaced it by a call to armature_mat_pose_to_bone. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notes: * All those changes leave many #if 0 commented code, I will remove those in a few weeks. * There is at least one other place where generic armature_mat_(pose_to_bone/bone_to_pose) functions should be usable: the space conversion function of constraints (constraint_mat_convertspace(), in BKE's constraint.c), but here I have some problems (old code is also somewhat erroneous, but using new one makes old rigs using bone space constraints wrong, e.g. sintel one, and it’s just impossible to make conversion code...). So I'll wait and investigate more for this one. --- source/blender/blenkernel/BKE_armature.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_armature.h') diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index b09122d022b..e94ad6ecfac 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -107,6 +107,7 @@ void armature_mat_world_to_pose(struct Object *ob, float inmat[][4], float outma void armature_loc_world_to_pose(struct Object *ob, float *inloc, float *outloc); void armature_mat_pose_to_bone(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]); void armature_loc_pose_to_bone(struct bPoseChannel *pchan, float *inloc, float *outloc); +void armature_mat_bone_to_pose(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]); void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]); void armature_mat_pose_to_bone_ex(struct Object *ob, struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]); -- cgit v1.2.3