diff options
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 51 |
1 files changed, 36 insertions, 15 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index de4b8ffb193..2a6a7fae612 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -468,33 +468,54 @@ static void OBJECT_engine_init(void *vedata) if (ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) { e_data.grid_flag = PLANE_YZ; - e_data.grid_flag |= SHOW_AXIS_Y; - e_data.grid_flag |= SHOW_AXIS_Z; - e_data.grid_flag |= SHOW_GRID; - e_data.grid_flag |= GRID_BACK; + if (show_axis_y) { + e_data.grid_flag |= SHOW_AXIS_Y; + } + if (show_axis_z) { + e_data.grid_flag |= SHOW_AXIS_Z; + } + if (show_floor) { + e_data.grid_flag |= SHOW_GRID; + e_data.grid_flag |= GRID_BACK; + } } else if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) { e_data.grid_flag = PLANE_XY; - e_data.grid_flag |= SHOW_AXIS_X; - e_data.grid_flag |= SHOW_AXIS_Y; - e_data.grid_flag |= SHOW_GRID; - e_data.grid_flag |= GRID_BACK; + if (show_axis_x) { + e_data.grid_flag |= SHOW_AXIS_X; + } + if (show_axis_y) { + e_data.grid_flag |= SHOW_AXIS_Y; + } + if (show_floor) { + e_data.grid_flag |= SHOW_GRID; + e_data.grid_flag |= GRID_BACK; + } } else if (ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) { e_data.grid_flag = PLANE_XZ; - e_data.grid_flag |= SHOW_AXIS_X; - e_data.grid_flag |= SHOW_AXIS_Z; - e_data.grid_flag |= SHOW_GRID; - e_data.grid_flag |= GRID_BACK; + if (show_axis_x) { + e_data.grid_flag |= SHOW_AXIS_X; + } + if (show_axis_z) { + e_data.grid_flag |= SHOW_AXIS_Z; + } + if (show_floor) { + e_data.grid_flag |= SHOW_GRID; + e_data.grid_flag |= GRID_BACK; + } } else { /* RV3D_VIEW_USER */ e_data.grid_flag = PLANE_XY; - if (show_axis_x) + if (show_axis_x) { e_data.grid_flag |= SHOW_AXIS_X; - if (show_axis_y) + } + if (show_axis_y) { e_data.grid_flag |= SHOW_AXIS_Y; - if (show_floor) + } + if (show_floor) { e_data.grid_flag |= SHOW_GRID; + } } } |