From 5732d9e1dcc08d284d7f9f56be22ad901fd53f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 26 Sep 2018 20:31:14 +0200 Subject: Wireframe/Xray: Make Xray option local to wireframe mode This commit make the Xray option for the wireframe different from the other shading mode. This makes it possible to rapidly switch between wireframe + Xray and Solid mode without Xray. Xray alpha is also decoupled. Both variables are duplicated and exposed separately through RNA. --- source/blender/blenkernel/intern/screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/screen.c') diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 299c9290eae..84962e9b03f 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -787,10 +787,11 @@ void BKE_screen_view3d_shading_init(View3DShading *shading) shading->type = OB_SOLID; shading->prev_type = OB_SOLID; - shading->flag = V3D_SHADING_SPECULAR_HIGHLIGHT; + shading->flag = V3D_SHADING_SPECULAR_HIGHLIGHT | V3D_SHADING_XRAY_WIREFRAME; shading->light = V3D_LIGHTING_STUDIO; shading->shadow_intensity = 0.5f; shading->xray_alpha = 0.5f; + shading->xray_alpha_wire = 0.5f; shading->cavity_valley_factor = 1.0f; shading->cavity_ridge_factor = 1.0f; copy_v3_fl(shading->single_color, 0.8f); -- cgit v1.2.3