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:
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
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue