From d1cda823e0a84487915fa81617dbec5b582fe4b6 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Thu, 11 Apr 2019 19:43:06 +0200 Subject: Fix T63341: Xray mode makes some shading popover options grayed out despite them working Do not gray out shading items if the xray alpha value is 1. They are rendered correctly in viewport so there is no reason to mark them as disabled in the shading menu. --- release/scripts/startup/bl_ui/space_view3d.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 81c98740652..5423eb7f5e0 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4658,10 +4658,12 @@ class VIEW3D_PT_shading_options(Panel): sub = row.row() sub.active = shading.show_xray sub.prop(shading, "xray_alpha", text="X-Ray") + #X-ray mode is off when alpha is 1.0 + xray_active = shading.show_xray and shading.xray_alpha != 1 row = col.row() row.prop(shading, "show_shadows", text="") - row.active = not shading.show_xray + row.active = not xray_active sub = row.row(align=True) sub.active = shading.show_shadows sub.prop(shading, "shadow_intensity", text="Shadow") @@ -4674,10 +4676,10 @@ class VIEW3D_PT_shading_options(Panel): col = layout.column() row = col.row() - row.active = not shading.show_xray + row.active = not xray_active row.prop(shading, "show_cavity") - if shading.show_cavity and not shading.show_xray: + if shading.show_cavity and not xray_active: row.prop(shading, "cavity_type", text="Type") if shading.cavity_type in {'WORLD', 'BOTH'}: @@ -4698,7 +4700,7 @@ class VIEW3D_PT_shading_options(Panel): sub.prop(shading, "curvature_valley_factor", text="Valley") row = col.row() - row.active = not shading.show_xray + row.active = not xray_active row.prop(shading, "use_dof", text="Depth Of Field") if shading.type in {'WIREFRAME', 'SOLID'}: -- cgit v1.2.3