[Bf-blender-cvs] [baf599610a4] blender2.8: Fix T58661: Shading pie doesn't highlight x-ray when on
Campbell Barton
noreply at git.blender.org
Wed Dec 5 01:52:14 CET 2018
Commit: baf599610a4b288c1839fdf1715999597328d2f1
Author: Campbell Barton
Date: Wed Dec 5 11:50:35 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBbaf599610a4b288c1839fdf1715999597328d2f1
Fix T58661: Shading pie doesn't highlight x-ray when on
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 54a0245fc05..ccacff00992 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3897,7 +3897,32 @@ class VIEW3D_MT_shading_ex_pie(Menu):
else:
sub = pie.row()
sub.active = False
- sub.operator("view3d.toggle_xray", text="Toggle X-Ray", icon='XRAY')
+
+ if False:
+ sub.operator("view3d.toggle_xray", text="Toggle X-Ray", icon='XRAY')
+ else:
+ # XXX, duplicate 'view3d.toggle_xray' logic, so we can see the active item: T58661.
+ if (
+ (context.mode == 'POSE') or
+ ((context.mode == 'WEIGHT_PAINT') and (context.active_object.find_armature()))
+ ):
+ pie.prop(view.overlay, "show_bone_select", icon='XRAY')
+ else:
+ xray_active = (
+ (context.mode == 'EDIT_MESH') or
+ (view.shading.type in {'SOLID', 'WIREFRAME'})
+ )
+ if xray_active:
+ sub = pie
+ else:
+ sub = pie.row()
+ sub.active = False
+ sub.prop(
+ view.shading,
+ "show_xray_wireframe" if (view.shading.type == 'WIREFRAME') else "show_xray",
+ text="Toggle X-Ray",
+ icon='XRAY',
+ )
pie.prop(view.overlay, "show_overlays", text="Toggle Overlays", icon='OVERLAY')
More information about the Bf-blender-cvs
mailing list