Fix T48476: 'Recalculate Bone to Cursor' fails

This commit is contained in:
Campbell Barton 2016-05-22 17:47:39 +10:00
parent 24a3a9e8a3
commit e21af38f69
Notes: blender-bot 2023-02-14 07:52:38 +01:00
Referenced by issue #48476, "Recalculate Bone Roll > Cursor" doesn't seem to work as expected
1 changed files with 3 additions and 2 deletions

View 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) {