From ea6cd1c8f05b27a81e835251e779f047a3488203 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 18 Sep 2020 19:20:22 +0200 Subject: Overlay: Fade Inactive Geometry This implements a new overlay that blends the bakground color over the objects that are not in the same mode as the active object, making them fade with the background. This is especially needed for sculpt mode as there is no other overlay or indication in the viewport to display which object is active. This is intended to be used with D7510 in order to have a faster workflow when sculpting models with multiple objects. Reviewed By: fclem Differential Revision: https://developer.blender.org/D8679 --- source/blender/blenloader/intern/versioning_290.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 022a720b2ef..1d4912db330 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -735,5 +735,20 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + + /* Darken Inactive Overlay. */ + if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "fade_alpha")) { + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + v3d->overlay.fade_alpha = 0.40f; + v3d->overlay.flag |= V3D_OVERLAY_FADE_INACTIVE; + } + } + } + } + } } } -- cgit v1.2.3