diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-21 12:13:43 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-21 12:18:48 +0400 |
commit | e27dcc3423d5cb9781074f5eb0afc00496759e36 (patch) | |
tree | 966bb18ee3d691d47d7695a5258fce659e363c98 /source/blender/editors/animation | |
parent | be87a65f49300deeb598983e42a1783f6812eba7 (diff) |
Cleanup: no need to use constraint space transform API here, we can directly call
BKE_armature_mat_pose_to_bone (and avoids the need to get an Object pointer!).
Note the former just calls the later internally, in this case.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 2fd30ed5ecc..2c1b3c66dd3 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -57,7 +57,6 @@ #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" -#include "BKE_constraint.h" #include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_main.h" @@ -779,16 +778,9 @@ static float visualkey_get_value(PointerRNA *ptr, PropertyRNA *prop, int array_i rotmode = ob->rotmode; } else if (ptr->type == &RNA_PoseBone) { - Object *ob = (Object *)ptr->id.data; /* we assume that this is always set, and is an object */ bPoseChannel *pchan = (bPoseChannel *)ptr->data; - /* Although it is not strictly required for this particular space conversion, - * arg1 must not be null, as there is a null check for the other conversions to - * be safe. Therefore, the active object is passed here, and in many cases, this - * will be what owns the pose-channel that is getting this anyway. - */ - copy_m4_m4(tmat, pchan->pose_mat); - BKE_constraint_mat_convertspace(ob, pchan, tmat, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_LOCAL); + BKE_armature_mat_pose_to_bone(pchan, pchan->pose_mat, tmat); rotmode = pchan->rotmode; /* Loc code is specific... */ |