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:
Diffstat (limited to 'source/blender/src/view.c')
-rw-r--r--source/blender/src/view.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index c501dbb8f73..b17dfbd2bb7 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -152,6 +152,11 @@ void initgrabz(float x, float y, float z)
* (accounting for near zero values)
* */
if (G.vd->zfac < 1.e-6f && G.vd->zfac > -1.e-6f) G.vd->zfac = 1.0f;
+
+ /* Negative zfac means x, y, z was behind the camera (in perspective).
+ * This gives flipped directions, so revert back to ok default case.
+ */
+ if (G.vd->zfac < 0.0f) G.vd->zfac = 1.0f;
}
void window_to_3d(float *vec, short mx, short my)