Fix T48476: 'Recalculate Bone to Cursor' fails
authorCampbell Barton <ideasman42@gmail.com>
Sun, 22 May 2016 07:47:39 +0000 (17:47 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 22 May 2016 07:47:39 +0000 (17:47 +1000)
source/blender/editors/armature/armature_edit.c

index b1c23fb4cac1ea30ccac32a144d34dfd012a9af5..354b748e1292fa77cd78034eacf827c389f96b9c 100644 (file)
@@ -317,9 +317,10 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
                float cursor_local[3];
                const float   *cursor = ED_view3d_cursor3d_get(scene, v3d);
                
-               
+               invert_m4_m4(ob->imat, ob->obmat);
                copy_v3_v3(cursor_local, cursor);
-               mul_m3_v3(imat, cursor_local);
+               mul_m4_v3(ob->imat, cursor_local);
+
                
                /* cursor */
                for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {