Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_grid.c
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | void OVERLAY_grid_init(OVERLAY_Data *vedata) | ||||
| const bool show_axis_x = (pd->v3d_gridflag & V3D_SHOW_X) != 0; | const bool show_axis_x = (pd->v3d_gridflag & V3D_SHOW_X) != 0; | ||||
| const bool show_axis_y = (pd->v3d_gridflag & V3D_SHOW_Y) != 0; | const bool show_axis_y = (pd->v3d_gridflag & V3D_SHOW_Y) != 0; | ||||
| const bool show_axis_z = (pd->v3d_gridflag & V3D_SHOW_Z) != 0; | const bool show_axis_z = (pd->v3d_gridflag & V3D_SHOW_Z) != 0; | ||||
| const bool show_floor = (pd->v3d_gridflag & V3D_SHOW_FLOOR) != 0; | const bool show_floor = (pd->v3d_gridflag & V3D_SHOW_FLOOR) != 0; | ||||
| const bool show_ortho_grid = (pd->v3d_gridflag & V3D_SHOW_ORTHO_GRID) != 0; | const bool show_ortho_grid = (pd->v3d_gridflag & V3D_SHOW_ORTHO_GRID) != 0; | ||||
| shd->grid_flag = 0; | shd->grid_flag = 0; | ||||
| if (pd->hide_overlays || !(show_axis_y || show_axis_z || show_floor || show_ortho_grid)) { | if (pd->hide_overlays || (!(show_axis_x || show_axis_y || show_axis_z || show_floor || show_ortho_grid) && show_axis_z)) { | ||||
jbakker: This line is not clear and perhaps not complete or the issue is elsewhere. Think we should dive… | |||||
ankitmAuthorUnsubmitted Done Inline ActionsOh right. The return statement is never being used.. ankitm: Oh right. The return statement is never being used..
Z axis is causing some trouble. Checking. | |||||
Done Inline ActionsAt this point I think checking for pd->v3d_gridflag == 0 is better and less error prone. fclem: At this point I think checking for `pd->v3d_gridflag == 0` is better and less error prone. | |||||
| return; | return; | ||||
| } | } | ||||
| float viewinv[4][4], wininv[4][4]; | float viewinv[4][4], wininv[4][4]; | ||||
| float viewmat[4][4], winmat[4][4]; | float viewmat[4][4], winmat[4][4]; | ||||
| DRW_view_winmat_get(NULL, winmat, false); | DRW_view_winmat_get(NULL, winmat, false); | ||||
| DRW_view_winmat_get(NULL, wininv, true); | DRW_view_winmat_get(NULL, wininv, true); | ||||
| DRW_view_viewmat_get(NULL, viewmat, false); | DRW_view_viewmat_get(NULL, viewmat, false); | ||||
| DRW_view_viewmat_get(NULL, viewinv, true); | DRW_view_viewmat_get(NULL, viewinv, true); | ||||
| /* if perps */ | /* if perps */ | ||||
| ▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines | |||||
This line is not clear and perhaps not complete or the issue is elsewhere. Think we should dive deeper in the issue.