Fix T39112: increment snap does not work in perspective view at 0.01 scale (for scene and grid floor)

In case of "floor" grid (i.e. perspective views), unit_scale correction was not applied...
This commit is contained in:
Bastien Montagne 2014-03-11 16:37:00 +01:00
parent a7ab389d54
commit 6919ffbf4b
Notes: blender-bot 2023-02-14 11:01:30 +01:00
Referenced by commit 997b49a5f3, Fix for own rB6919ffbf4b2f (we only consider unit scale when we do use a unit system!).
Referenced by issue #39112, increment snap does not work in perspective view at 0.01 scale (for scene and grid floor)
1 changed files with 2 additions and 3 deletions

View File

@ -3262,9 +3262,8 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
glEnable(GL_MULTISAMPLE_ARB);
}
/* needs to be done always, gridview is adjusted in drawgrid() now */
rv3d->gridview = v3d->grid;
/* needs to be done always, gridview is adjusted in drawgrid() now, but only for ortho views. */
rv3d->gridview = v3d->grid / scene->unit.scale_length;
if ((rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO)) {
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {