diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-04-17 12:35:20 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-04-18 12:22:08 +0300 |
commit | 63bae864f40302b0a303498d26f230caf4f24339 (patch) | |
tree | ae87ecce8868b872d1f2403add5b9d4d5bf538c9 /source/blender/draw | |
parent | f7a28f0e11be825e8b1f74720f4d0b35a2d0104b (diff) |
Overlay Engine: Option to Disable AA Ortho Grid
When in Axis alligned orthographic view a grid was always displayed.
With this change the user can enable/disable this grid.
The Grid is always visible and editable, but only rendered active when user is in quad view, or axis aligned ortho view.
Reviewers: brecht, fclem
Maniphest Tasks: T63517
Differential Revision: https://developer.blender.org/D4699
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 786146dc2ff..1072efb7edd 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -511,6 +511,7 @@ static void OBJECT_engine_init(void *vedata) const bool show_axis_y = (v3d->gridflag & V3D_SHOW_Y) != 0; const bool show_axis_z = (v3d->gridflag & V3D_SHOW_Z) != 0; const bool show_floor = (v3d->gridflag & V3D_SHOW_FLOOR) != 0; + const bool show_ortho_grid = (v3d->gridflag & V3D_SHOW_ORTHO_GRID) != 0; e_data.draw_grid = show_axis_x || show_axis_y || show_axis_z || show_floor; DRW_viewport_matrix_get(winmat, DRW_MAT_WIN); @@ -559,15 +560,15 @@ static void OBJECT_engine_init(void *vedata) grid_res = viewdist / grid_scale; if (ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) { - e_data.draw_grid = true; + e_data.draw_grid = show_ortho_grid; e_data.grid_flag = PLANE_YZ | SHOW_AXIS_Y | SHOW_AXIS_Z | SHOW_GRID | GRID_BACK; } else if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) { - e_data.draw_grid = true; + e_data.draw_grid = show_ortho_grid; e_data.grid_flag = PLANE_XY | SHOW_AXIS_X | SHOW_AXIS_Y | SHOW_GRID | GRID_BACK; } else if (ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) { - e_data.draw_grid = true; + e_data.draw_grid = show_ortho_grid; e_data.grid_flag = PLANE_XZ | SHOW_AXIS_X | SHOW_AXIS_Z | SHOW_GRID | GRID_BACK; } else { /* RV3D_VIEW_USER */ |