Commit: ff39cbdc86ce671c91d0bacf5466ff089d4d5b4f
Author: Campbell Barton
Date:   Wed Jul 11 11:59:11 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBff39cbdc86ce671c91d0bacf5466ff089d4d5b4f

3D View: any view axis also showing grid

Setting accidentally impacted in ortho view.

===================================================================

M       source/blender/draw/modes/object_mode.c

===================================================================

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;
+                               }
                        }
                }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to