Fix T37143: Wrong normal dir with individual origins + one vert selected

This commit is contained in:
Campbell Barton 2013-11-28 19:23:05 +11:00
parent dc71cb5f6e
commit 47a8b38e53
Notes: blender-bot 2023-02-14 11:42:38 +01:00
Referenced by issue #37143, Wrong Normal Dir with Arbitrary Obj Rot + Normal Transf. Orient. + Individual Origins + Only one vert selected.
1 changed files with 9 additions and 1 deletions

View File

@ -576,7 +576,15 @@ void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[])
void setAxisMatrixConstraint(TransInfo *t, int mode, const char text[])
{
if (t->total == 1) {
setConstraint(t, t->data->axismtx, mode, text);
float axismtx[3][3];
if (t->flag & T_EDIT) {
mul_m3_m3m3(axismtx, t->obedit_mat, t->data->axismtx);
}
else {
copy_m3_m3(axismtx, t->data->axismtx);
}
setConstraint(t, axismtx, mode, text);
}
else {
BLI_strncpy(t->con.text + 1, text, sizeof(t->con.text) - 1);