From f9535b4eb59226b406d5132aa4d2091991c2f235 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 9 Oct 2007 06:21:26 +0000 Subject: Bugfix #7482: Trackball transform did not work correctly for "individual centers" pivot mode in face-select mode. It was missing a case that would allow this happen. --- source/blender/src/transform.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 1652ae5c268..5cbea044f9d 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -2242,6 +2242,7 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a { TransData *td = t->data; float mat[3][3], smat[3][3], totmat[3][3]; + float center[3]; int i; VecRotToMat3(axis1, angles[0], smat); @@ -2253,9 +2254,18 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a if (td->flag & TD_NOACTION) break; + VECCOPY(center, t->center); + if (t->around == V3D_LOCAL) { - if (t->flag & T_OBJECT) - VECCOPY(t->center, td->center); // not supported in editmode yet + /* local-mode shouldn't change center */ + if (t->flag & (T_OBJECT|T_POSE)) { + VECCOPY(t->center, td->center); + } + else { + if(G.vd->around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) { + VECCOPY(t->center, td->center); + } + } } if (t->flag & T_PROP_EDIT) { @@ -2264,8 +2274,10 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a Mat3MulMat3(mat, smat, totmat); } - + ElementRotation(t, td, mat); + + VECCOPY(t->center, center); } } -- cgit v1.2.3