Fix T78481: Workbench Shadow effects XRay

When in XRay some effects (shadow, cavity & depth of field) aren't supported.
This patch makes sure that these effects aren't enabled.
This commit is contained in:
Jeroen Bakker 2020-07-06 10:21:14 +02:00
parent 4f3045999d
commit 705015e0a4
Notes: blender-bot 2023-02-14 08:45:12 +01:00
Referenced by issue #78481, In the Shading Panel, shadow toggle and slider is faded when X-Ray is On
Referenced by issue #77455, Scale gizmos cause complete freezes in Blender 2.83 on Intel graphics
1 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,8 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
}
else if (XRAY_ENABLED(v3d)) {
wpd->shading.xray_alpha = XRAY_ALPHA(v3d);
/* Disable shading options that aren't supported in transparency mode. */
wpd->shading.flag &= ~(V3D_SHADING_SHADOW | V3D_SHADING_CAVITY | V3D_SHADING_DEPTH_OF_FIELD);
}
else {
wpd->shading.xray_alpha = 1.0f;