From 6b3981737ac547996bfdedaa95d8071aa712cab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 29 Oct 2018 15:34:47 +0100 Subject: Edit Mode: Fix "Hidden Wire" option not working --- source/blender/blenloader/intern/versioning_280.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index ab52a9b8b8f..52c83d83454 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -2162,7 +2162,21 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) gpd->grid.lines = GP_DEFAULT_GRID_LINES; // Number of lines gpd->grid.axis = GP_GRID_AXIS_Y; } + } - + { + for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + if (v3d->flag2 & V3D_OCCLUDE_WIRE) { + v3d->overlay.edit_flag |= V3D_OVERLAY_EDIT_OCCLUDE_WIRE; + v3d->flag2 &= ~V3D_OCCLUDE_WIRE; + } + } + } + } + } } } -- cgit v1.2.3