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/makesdna/DNA_view3d_defaults.h | 1 + source/blender/makesdna/DNA_view3d_types.h | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_view3d_defaults.h b/source/blender/makesdna/DNA_view3d_defaults.h index 62e3d14bd0c..68f23b33d07 100644 --- a/source/blender/makesdna/DNA_view3d_defaults.h +++ b/source/blender/makesdna/DNA_view3d_defaults.h @@ -52,6 +52,7 @@ { \ .wireframe_threshold = 1.0f, \ .xray_alpha_bone = 0.5f, \ + .fade_alpha = 0.40f, \ .texture_paint_mode_opacity = 1.0f, \ .weight_paint_mode_opacity = 1.0f, \ .vertex_paint_mode_opacity = 1.0f, \ diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 64f26a756db..3fc8b05c8b4 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -218,6 +218,9 @@ typedef struct View3DOverlay { /** Armature edit/pose mode settings. */ float xray_alpha_bone; + /** Darken Inactive. */ + float fade_alpha; + /** Other settings. */ float wireframe_threshold; @@ -230,6 +233,7 @@ typedef struct View3DOverlay { float gpencil_vertex_paint_opacity; /** Handles display type for curves. */ int handle_display; + char _pad[4]; } View3DOverlay; /* View3DOverlay->handle_display */ @@ -503,6 +507,7 @@ enum { V3D_OVERLAY_HIDE_OBJECT_XTRAS = (1 << 9), V3D_OVERLAY_HIDE_OBJECT_ORIGINS = (1 << 10), V3D_OVERLAY_STATS = (1 << 11), + V3D_OVERLAY_FADE_INACTIVE = (1 << 12), }; /** #View3DOverlay.edit_flag */ -- cgit v1.2.3