Keymap: adjustments to shading keys
authorCampbell Barton <ideasman42@gmail.com>
Fri, 23 Nov 2018 00:34:58 +0000 (11:34 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 23 Nov 2018 00:39:44 +0000 (11:39 +1100)
- Z shows pie menu (removed wire/xray toggles).
- Alt-Z toggles x-ray.
- Shift-Z toggles wireframe.
- Shift-Alt-Z toggles overlays.

Note that toggle overlays had no binding for 2.7x,
this is likely not a heavily used option and could even be left out.

release/scripts/presets/keyconfig/keymap_data/blender_default.py
release/scripts/startup/bl_ui/space_view3d.py

index af639fac1a1b7e4d04fad75102dbd59eec050843..c052364c93f641de2fd3aded3489375a731b418a 100644 (file)
@@ -1022,13 +1022,14 @@ def km_view3d(params):
              {"properties": [("data_path", 'space_data.show_gizmo_tool')]}),
             op_menu_pie("VIEW3D_MT_pivot_pie", {"type": 'PERIOD', "value": 'PRESS'}),
             op_menu_pie("VIEW3D_MT_orientations_pie", {"type": 'COMMA', "value": 'PRESS'}),
-            op_menu_pie("VIEW3D_MT_shading_pie", {"type": 'D', "value": 'PRESS'}),
-            ("wm.context_toggle_enum", {"type": 'Z', "value": 'PRESS'},
-             {"properties": [("data_path", 'space_data.shading.type'), ("value_1", 'WIREFRAME'), ("value_2", 'SOLID')]}),
-            ("view3d.toggle_shading", {"type": 'Z', "value": 'PRESS', "alt": True},
-             {"properties": [("type", 'MATERIAL')]}),
+            ("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
+             {"properties": [("data_path", 'space_data.show_gizmo_tool')]}),
+            op_menu_pie("VIEW3D_MT_shading_pie", {"type": 'Z', "value": 'PRESS'}),
             ("view3d.toggle_shading", {"type": 'Z', "value": 'PRESS', "shift": True},
-             {"properties": [("type", 'RENDERED')]}),
+             {"properties": [("type", 'WIREFRAME')]}),
+            ("view3d.toggle_xray", {"type": 'Z', "value": 'PRESS', "alt": True}, None),
+            ("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
+             {"properties": [("data_path", "space_data.overlay.show_overlays")]}),
         ])
     else:
         items.extend([
index 55d1636bd19df93fe185694682025e7d9d5c916e..e7541729bfd39ac0c915b74e90f48a3762e60425 100644 (file)
@@ -3848,21 +3848,8 @@ class VIEW3D_MT_shading_pie(Menu):
 
         view = context.space_data
 
-        pie.prop_enum(view.shading, "type", value='WIREFRAME')
         pie.prop_enum(view.shading, "type", value='SOLID')
-
-        xray_active = (
-            (context.mode in {'POSE', 'EDIT_MESH'}) or
-            (view.shading.type in {'SOLID', 'WIREFRAME'})
-        )
-        if xray_active:
-            sub = pie
-        else:
-            sub = pie.row()
-            sub.active = False
-        sub.operator("view3d.toggle_xray", text="Toggle X-Ray", icon='XRAY')
-
-        pie.prop(view.overlay, "show_overlays", text="Toggle Overlays", icon='OVERLAY')
+        pie.prop_enum(view.shading, "type", value='WIREFRAME')
         pie.prop_enum(view.shading, "type", value='MATERIAL')
         pie.prop_enum(view.shading, "type", value='RENDERED')