Fix T61701: Orthographic Viewpoints Hidden Grid
authorSebastian Parborg <darkdefende@gmail.com>
Tue, 19 Feb 2019 17:51:57 +0000 (18:51 +0100)
committerSebastian Parborg <darkdefende@gmail.com>
Tue, 19 Feb 2019 17:53:15 +0000 (18:53 +0100)
If all axis and grid options were turned off, the grid in the main ortho views would not be rendered.
Now we force rendering of the grid regardless of the settings when in one of the main ortho views.

Reviewed By: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D4378

source/blender/draw/modes/object_mode.c

index 05f44a0..a20aaf4 100644 (file)
@@ -549,12 +549,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.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.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.grid_flag = PLANE_XZ | SHOW_AXIS_X | SHOW_AXIS_Z | SHOW_GRID | GRID_BACK;
                        }
                        else { /* RV3D_VIEW_USER */