Fix T58794: extended shading pie menu wrong order in lookdev mode.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 5 Dec 2018 14:19:52 +0000 (15:19 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 5 Dec 2018 14:22:20 +0000 (15:22 +0100)
release/scripts/addons_contrib
release/scripts/startup/bl_ui/space_view3d.py

index 5c4210d5b78c61137c5f32e7deb7561177ac0894..41d528d76b99e689e09915f5dcd589480579ef3a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5c4210d5b78c61137c5f32e7deb7561177ac0894
+Subproject commit 41d528d76b99e689e09915f5dcd589480579ef3a
index ccacff009922cd09eed0b36e7833eda0d0d73ed0..e0f72e810968511b933a47596cab756743ca5b69 100644 (file)
@@ -3888,41 +3888,28 @@ class VIEW3D_MT_shading_ex_pie(Menu):
         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
-
-        if False:
-            sub.operator("view3d.toggle_xray", text="Toggle X-Ray", icon='XRAY')
+        # Note this duplicates '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_xray_bone", 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')
+            xray_active = (
+                (context.mode == 'EDIT_MESH') or
+                (view.shading.type in {'SOLID', 'WIREFRAME'})
+            )
+            if xray_active:
+                sub = pie
             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',
-                )
+                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')