Fix #112242: Workbench: Allow xray in render mode
This commit is contained in:
parent
4caa2dddd9
commit
f25418b730
|
@ -70,20 +70,18 @@ void SceneState::init(Object *camera_ob /*= nullptr*/)
|
|||
}
|
||||
}
|
||||
|
||||
if (!is_render_mode) {
|
||||
if (shading.type < OB_SOLID) {
|
||||
shading.light = V3D_LIGHTING_FLAT;
|
||||
shading.color_type = V3D_SHADING_OBJECT_COLOR;
|
||||
shading.xray_alpha = 0.0f;
|
||||
}
|
||||
else if (SHADING_XRAY_ENABLED(shading)) {
|
||||
shading.xray_alpha = SHADING_XRAY_ALPHA(shading);
|
||||
}
|
||||
else {
|
||||
shading.xray_alpha = 1.0f;
|
||||
}
|
||||
if (shading.type < OB_SOLID) {
|
||||
shading.light = V3D_LIGHTING_FLAT;
|
||||
shading.color_type = V3D_SHADING_OBJECT_COLOR;
|
||||
shading.xray_alpha = 0.0f;
|
||||
}
|
||||
xray_mode = !is_render_mode && shading.xray_alpha != 1.0f;
|
||||
else if (SHADING_XRAY_ENABLED(shading)) {
|
||||
shading.xray_alpha = SHADING_XRAY_ALPHA(shading);
|
||||
}
|
||||
else {
|
||||
shading.xray_alpha = 1.0f;
|
||||
}
|
||||
xray_mode = shading.xray_alpha != 1.0f;
|
||||
|
||||
if (SHADING_XRAY_FLAG_ENABLED(shading)) {
|
||||
/* Disable shading options that aren't supported in transparency mode. */
|
||||
|
|
Loading…
Reference in New Issue