Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2007-10-09 10:21:26 +0400
committerJoshua Leung <aligorith@gmail.com>2007-10-09 10:21:26 +0400
commitf9535b4eb59226b406d5132aa4d2091991c2f235 (patch)
tree794f5273a9c3b18e8920a9190b481a48aadc5397
parent3a6494c4b847da97428f6696d1f6c2561f5d787c (diff)
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.
-rw-r--r--source/blender/src/transform.c18
1 files 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);
}
}