diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-07-05 16:01:04 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-07-05 17:57:22 +0300 |
commit | 4dfcc6c25a6e058e107b996d08403b803cc52915 (patch) | |
tree | 308d13b34d2161ff7ac441f5da7043198acdecce /source/blender/makesdna | |
parent | 5db711fdd9d23ef2e54f19545398a6520fa02b56 (diff) |
Overlay: enable/disable drawing of specific object types.
This patch will allow users to customize what object types will be drawn by the object mode overlay.
It supports: Empties, Lamps, Cameras, Speakers, Armatures and Lightprobes.
It currently does not support Physics objects due to the overlap it has with other objects types.
Also be aware that in pose mode the armature is drawn, but not by the object mode overlay
Reviewers: campbellbarton
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3524
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 14 |
1 files changed, 13 insertions, 1 deletions
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), |