From f7ec70895c78900db8e7db88d3713ebb9aa62730 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 5 Jul 2018 14:38:14 +0200 Subject: Overlay: enable/disable drawing of specific object types. Added a option to the overlay popover that controls the visibility of non-renderable objects like lamps, cameras, speakers, armatures, curves empties and force fields. After discussion we went for a single option with more detailed check in the object_mode draw engine. Differential Revision: https://developer.blender.org/D3524 --- source/blender/makesdna/DNA_view3d_types.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_view3d_types.h') diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 70f06b2eda0..f7fd4a52a5f 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -49,6 +49,7 @@ struct GPUViewport; #include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_image_types.h" +#include "DNA_object_types.h" #include "DNA_movieclip_types.h" #include "DNA_gpu_types.h" @@ -178,8 +179,8 @@ typedef struct View3DOverlay { /* Other settings */ float wireframe_threshold; + int visible_object_types; - int pad; } View3DOverlay; /* 3D ViewPort Struct */ @@ -383,6 +384,17 @@ enum { V3D_OVERLAY_ONION_SKINS = (1 << 7), }; +/* View3DOverlay->visible_object_types */ +enum { + V3D_OVERLAY_SHOW_EMPTY = (1 << OB_EMPTY), + V3D_OVERLAY_SHOW_LAMP = (1 << OB_LAMP), + V3D_OVERLAY_SHOW_CAMERA = (1 << OB_CAMERA), + V3D_OVERLAY_SHOW_SPEAKER = (1 << OB_SPEAKER), + V3D_OVERLAY_SHOW_LIGHTPROBE = (1 << OB_LIGHTPROBE), + V3D_OVERLAY_SHOW_ARMATURE = (1 << OB_ARMATURE), +}; +#define V3D_OVERLAY_VISIBLE_OBJECT_TYPES_MASK (V3D_OVERLAY_SHOW_EMPTY | V3D_OVERLAY_SHOW_LAMP | V3D_OVERLAY_SHOW_CAMERA | V3D_OVERLAY_SHOW_SPEAKER | V3D_OVERLAY_SHOW_LIGHTPROBE | V3D_OVERLAY_SHOW_ARMATURE) + /* View3DOverlay->edit_flag */ enum { V3D_OVERLAY_EDIT_VERT_NORMALS = (1 << 0), -- cgit v1.2.3