diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-28 14:00:40 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-28 16:09:57 +0300 |
commit | dee5c1aa409cb9d3f80f7b8422b073e67a469cfc (patch) | |
tree | c5ce182004300c810e24c02ba63ac3e49303186a /release | |
parent | 94370e23e975397e5656026f25d936221cf2f1ec (diff) |
MeshAnalysis: Disable when XRay is turned on
When XRay is turned on the mesh analysis did not draw correct. This
change won't draw the mesh analysis overlay when xray is turned on.
In terms of giving the user a visual feedback of this limitation we
render the overlay options inactive.
Reviewed By: brecht, fclem
Maniphest Tasks: T65225
Differential Revision: https://developer.blender.org/D4965
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b79d5bf7aa2..fdf9570763a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5557,6 +5557,7 @@ class VIEW3D_PT_overlay_edit_mesh_shading(Panel): layout = self.layout view = context.space_data + shading = view.shading overlay = view.overlay tool_settings = context.tool_settings display_all = overlay.show_overlays @@ -5574,12 +5575,21 @@ class VIEW3D_PT_overlay_edit_mesh_shading(Panel): sub = row.row() sub.prop(tool_settings, "vertex_group_user", expand=True) - col.prop(overlay, "show_statvis", text="Mesh Analysis") + if shading.type == 'WIREFRAME': + xray = shading.show_xray_wireframe and shading.xray_alpha_wireframe < 1.0 + elif shading.type == 'SOLID': + xray = shading.show_xray and shading.xray_alpha < 1.0 + else: + xray = False + statvis_active = not xray + row = col.row() + row.active = statvis_active + row.prop(overlay, "show_statvis", text="Mesh Analysis") if overlay.show_statvis: col = col.column() + col.active = statvis_active sub = col.split() - sub.active = overlay.show_statvis sub.label(text="Type") sub.prop(statvis, "type", text="") |