From 63bae864f40302b0a303498d26f230caf4f24339 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Wed, 17 Apr 2019 11:35:20 +0200 Subject: Overlay Engine: Option to Disable AA Ortho Grid When in Axis alligned orthographic view a grid was always displayed. With this change the user can enable/disable this grid. The Grid is always visible and editable, but only rendered active when user is in quad view, or axis aligned ortho view. Reviewers: brecht, fclem Maniphest Tasks: T63517 Differential Revision: https://developer.blender.org/D4699 --- source/blender/blenloader/intern/versioning_280.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index a68da431d57..523e0b3d340 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3116,6 +3116,18 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* enable the axis aligned ortho grid by default */ + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + v3d->gridflag |= V3D_SHOW_ORTHO_GRID; + } + } + } + } } { -- cgit v1.2.3