[Bf-blender-cvs] [d1cda823e0a] master: Fix T63341: Xray mode makes some shading popover options grayed out despite them working

Sebastian Parborg noreply at git.blender.org
Thu Apr 11 19:46:18 CEST 2019


Commit: d1cda823e0a84487915fa81617dbec5b582fe4b6
Author: Sebastian Parborg
Date:   Thu Apr 11 19:43:06 2019 +0200
Branches: master
https://developer.blender.org/rBd1cda823e0a84487915fa81617dbec5b582fe4b6

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.

===================================================================

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 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'}:



More information about the Bf-blender-cvs mailing list