correction to own recent changes to exitmode using axis-matrix, fallback to old behavior for editmodes where the axis-matrix isnt set (curve, surface, lattice)

This commit is contained in:
Campbell Barton 2013-04-10 23:05:35 +00:00
parent 8c1cb10cfd
commit 5eb37f9e5c

@ -559,7 +559,10 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[])
{
/* edit-mode now allows local transforms too */
#if 1
if ((t->flag & T_EDIT) && (t->around != V3D_LOCAL)) {
if ((t->flag & T_EDIT) &&
/* not all editmode supports axis-matrix */
((t->around != V3D_LOCAL) || (!ELEM3(t->obedit->type, OB_MESH, OB_MBALL, OB_ARMATURE))))
{
float obmat[3][3];
copy_m3_m4(obmat, t->scene->obedit->obmat);
normalize_m3(obmat);