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:
authorTon Roosendaal <ton@blender.org>2005-08-14 15:15:36 +0400
committerTon Roosendaal <ton@blender.org>2005-08-14 15:15:36 +0400
commit65576fe663cb3b99ac5cbb39eca130248852895d (patch)
tree55c2786868fcecc00ca3497667206131792b7908 /source/blender
parentf47f8d94185cfcd0a7e8eda0544910012f8ea3ac (diff)
Patch provided by Adam (ajk48n). It reverses the turntable rotation when
you have the view 'upside down', resulting in correct feedback.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/view.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index 3304f71c79b..bd0e9f21e46 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -436,7 +436,7 @@ void viewmove(int mode)
{
Object *ob = OBACT;
float firstvec[3], newvec[3], dvec[3];
- float oldquat[4], q1[4], si, phi, dist0;
+ float reverse, oldquat[4], q1[4], si, phi, dist0;
float ofs[3], obofs[3];
int firsttime=1;
short mvalball[2], mval[2], mvalo[2];
@@ -471,6 +471,10 @@ void viewmove(int mode)
}
}
+ reverse= 1.0f;
+ if (G.vd->persmat[2][1] < 0.0f)
+ reverse= -1.0f;
+
while(TRUE) {
getmouseco_sc(mval);
@@ -580,7 +584,7 @@ void viewmove(int mode)
}
/* Perform the orbital rotation */
- phi = sensitivity * (mval[0] - mvalo[0]);
+ phi = sensitivity * reverse * (mval[0] - mvalo[0]);
q1[0] = cos(phi);
q1[1] = q1[2] = 0.0;
q1[3] = sin(phi);