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/editors/include/ED_view3d.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include/ED_view3d.h') diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 605c9bc3d97..713cc21c8ec 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -535,8 +535,8 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx, void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *ar); void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa); -#define V3D_IS_ZBUF(v3d) \ - (((v3d)->shading.flag & V3D_SHADING_XRAY) == 0) +#define V3D_XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY) +#define V3D_IS_ZBUF(v3d) (((v3d)->shading.flag & V3D_XRAY_FLAG(v3d)) == 0) void ED_view3d_id_remap(struct View3D *v3d, const struct ID *old_id, struct ID *new_id); -- cgit v1.2.3