diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-04-11 20:43:06 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-04-11 20:43:06 +0300 |
commit | d1cda823e0a84487915fa81617dbec5b582fe4b6 (patch) | |
tree | d4acfb52b83903b0409f96c268e6fc1a8823252b | |
parent | adaa7688ee77f4bce284b99ef5ac19a7c7a8ae42 (diff) |
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.
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 10 |
1 files changed, 6 insertions, 4 deletions
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'}: |