[Bf-blender-cvs] [b7ca2365cfc] master: UI: Hide fade inactive geometry overlay settings for unsupported modes

Philipp Oeser noreply at git.blender.org
Wed Oct 7 10:30:16 CEST 2020


Commit: b7ca2365cfc3d7b05779ab6d01e500e2938aa25e
Author: Philipp Oeser
Date:   Tue Sep 22 18:12:12 2020 +0200
Branches: master
https://developer.blender.org/rBb7ca2365cfc3d7b05779ab6d01e500e2938aa25e

UI: Hide fade inactive geometry overlay settings for unsupported modes

If this doesnt work in a particular mode, it would be better to indicate
that in the Overlay popup.

Differential Revision: https://developer.blender.org/D8981

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

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 c6fad77352c..92768305605 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6111,11 +6111,12 @@ class VIEW3D_PT_overlay_geometry(Panel):
 
         col.prop(overlay, "show_face_orientation")
         row = col.row(align=True)
-
-        row.prop(overlay, "show_fade_inactive", text="")
-        sub = row.row()
-        sub.active = overlay.show_fade_inactive
-        sub.prop(overlay, "fade_inactive_alpha", text="Fade Inactive Geometry")
+        if context.mode not in {'EDIT_ARMATURE', 'POSE', 'OBJECT', 'PAINT_GPENCIL',\
+                                'VERTEX_GPENCIL', 'WEIGHT_GPENCIL', 'SCULPT_GPENCIL', 'EDIT_GPENCIL'}:
+            row.prop(overlay, "show_fade_inactive", text="")
+            sub = row.row()
+            sub.active = overlay.show_fade_inactive
+            sub.prop(overlay, "fade_inactive_alpha", text="Fade Inactive Geometry")
 
         # sub.prop(overlay, "show_onion_skins")



More information about the Bf-blender-cvs mailing list