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
This commit is contained in:
Philipp Oeser 2020-09-22 18:12:12 +02:00
parent 7f7efe78ce
commit b7ca2365cf
1 changed files with 6 additions and 5 deletions

View File

@ -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")