diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-12-27 21:09:17 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-12-27 21:09:17 +0300 |
commit | 280a1d09f6cafa5bd9b117b5b39bf90b2d21bdf0 (patch) | |
tree | 80c723f366b6d67646ab700460008422e1ffe71d /source/blender/editors/transform | |
parent | d1f1583c7979369d3fcc91ff25aea1b8152dcce7 (diff) |
Partial fix for [#20166] Snap to grid issues
Move gridview (the actual drawn grid size, including adaptation to zoom) to RegionView3D from View3D.
This solves the transform increment bug but not the Snap Menu bug (context is not set to the correct rv3d when executing operator from menu).
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 40db0f7b272..fa435f29773 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -3083,10 +3083,10 @@ void initTranslation(TransInfo *t) t->ndof.axis = (t->flag & T_2D_EDIT)? 1|2: 1|2|4; if(t->spacetype == SPACE_VIEW3D) { - View3D *v3d = t->view; + RegionView3D *rv3d = t->ar->regiondata; t->snap[0] = 0.0f; - t->snap[1] = v3d->gridview * 1.0f; + t->snap[1] = rv3d->gridview * 1.0f; t->snap[2] = t->snap[1] * 0.1f; } else if(t->spacetype == SPACE_IMAGE) { |