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>2009-08-31 08:24:28 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-31 08:24:28 +0400
commit7ad4386653ad916a97f3054cab46350ea90fcc54 (patch)
treedd708e0f3c224ffd30b9787f6f934076b0ce1970 /source/blender/editors/space_view3d
parent3fa51df744ea5c4585e4cb53a207a0f106ec2032 (diff)
Grease Pencil: Cleanup Work + Bugfixes
* Disabled temporary debugging prints, since event handling now seems stable * Modified the initgrabz() code so that when the cursor is behind the viewplane, the z-factor is calculated as if the cursor was on the other side of the view plane. This seems to work well, and doesn't seem to have any negative side-effects (yet).
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 771c02e95b6..c61b2f0f31d 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -482,7 +482,10 @@ void initgrabz(RegionView3D *rv3d, float x, float y, float z)
/* Negative zfac means x, y, z was behind the camera (in perspective).
* This gives flipped directions, so revert back to ok default case.
*/
- if (rv3d->zfac < 0.0f) rv3d->zfac = 1.0f;
+ // NOTE: I've changed this to flip zfac to be positive again for now so that GPencil draws ok
+ // -- Aligorith, 2009Aug31
+ //if (rv3d->zfac < 0.0f) rv3d->zfac = 1.0f;
+ if (rv3d->zfac < 0.0f) rv3d->zfac= -rv3d->zfac;
}
/* always call initgrabz */