Correct own error in changes to pose gizmo center
authorCampbell Barton <ideasman42@gmail.com>
Tue, 18 Dec 2018 12:01:38 +0000 (23:01 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 18 Dec 2018 12:03:29 +0000 (23:03 +1100)
Multi-pose gizmo center calculation from
5d09f5223e63 now works as expected.

source/blender/editors/transform/transform_gizmo_3d.c

index 3c0ba9649749935b1e7e07587f8577a981fe576d..84d9930871ac00b4d2f5188eaa1800f58cfa69d6 100644 (file)
@@ -1024,14 +1024,13 @@ int ED_transform_calc_gizmo_stats(
                        if (totsel_iter) {
                                float mat_local[4][4];
                                if (use_mat_local) {
-                                       mul_m4_m4m4(mat_local, ob_iter->imat, ob_iter->obmat);
+                                       mul_m4_m4m4(mat_local, ob->imat, ob_iter->obmat);
                                }
 
                                /* use channels to get stats */
                                for (pchan = ob_iter->pose->chanbase.first; pchan; pchan = pchan->next) {
                                        Bone *bone = pchan->bone;
                                        if (bone && (bone->flag & BONE_TRANSFORM)) {
-                                               calc_tw_center(tbounds, pchan->pose_head);
                                                calc_tw_center_with_matrix(tbounds, pchan->pose_head, use_mat_local, mat_local);
                                                protectflag_to_drawflags_pchan(rv3d, pchan);
                                        }