diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-01 09:59:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-01 09:59:50 +0400 |
commit | a834007a9b9b7adca2e57bf6ff575524bee80804 (patch) | |
tree | 527913e721ecee8b87095ebbf29ebeb2b099018d /source/blender/makesrna/intern/rna_pose.c | |
parent | 7836069775a688cceb40d3892d84886e80c437fd (diff) |
Previous fix for [#29484] wasn't working right (did work in report file though).
this now shares code with RNA's 'pchan.matrix = matrix'
tested with parent scale/rot/translation
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 0315352f2c8..9ed3f8f186f 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -613,18 +613,10 @@ static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values) { bPoseChannel *pchan= (bPoseChannel*)ptr->data; Object *ob= (Object*)ptr->id.data; - float umat[4][4]= MAT4_UNITY; float tmat[4][4]; - /* recalculate pose matrix with only parent transformations, - * bone loc/sca/rot is ignored, scene and frame are not used. */ - where_is_pose_bone(NULL, ob, pchan, 0.0f, FALSE); + armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat); - /* find the matrix, need to remove the bone transforms first so this is - * calculated as a matrix to set rather then a difference ontop of whats - * already there. */ - pchan_apply_mat4(pchan, umat, FALSE); - armature_mat_pose_to_bone(pchan, (float (*)[4])values, tmat); pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */ } |