Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2018-07-05 16:01:04 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-07-05 17:57:22 +0300
commit4dfcc6c25a6e058e107b996d08403b803cc52915 (patch)
tree308d13b34d2161ff7ac441f5da7043198acdecce /source/blender/draw/modes
parent5db711fdd9d23ef2e54f19545398a6520fa02b56 (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/draw/modes')
-rw-r--r--source/blender/draw/modes/object_mode.c52
1 files changed, 35 insertions, 17 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 736bde725ae..2beb453e069 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2217,34 +2217,52 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
break;
}
case OB_LAMP:
- DRW_shgroup_lamp(stl, ob, view_layer);
+ if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_LAMP)
+ {
+ DRW_shgroup_lamp(stl, ob, view_layer);
+ }
break;
case OB_CAMERA:
- DRW_shgroup_camera(stl, ob, view_layer);
+ if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_CAMERA)
+ {
+ DRW_shgroup_camera(stl, ob, view_layer);
+ }
break;
case OB_EMPTY:
- DRW_shgroup_empty(stl, psl, ob, view_layer);
+ if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_EMPTY)
+ {
+ DRW_shgroup_empty(stl, psl, ob, view_layer);
+ }
break;
case OB_SPEAKER:
- DRW_shgroup_speaker(stl, ob, view_layer);
+ if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_SPEAKER)
+ {
+ DRW_shgroup_speaker(stl, ob, view_layer);
+ }
break;
case OB_LIGHTPROBE:
- DRW_shgroup_lightprobe(stl, psl, ob, view_layer);
+ if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_LIGHTPROBE)
+ {
+ DRW_shgroup_lightprobe(stl, psl, ob, view_layer);
+ }
break;
case OB_ARMATURE:
{
- bArmature *arm = ob->data;
- if (arm->edbo == NULL) {
- if (DRW_state_is_select() || !DRW_pose_mode_armature(ob, draw_ctx->obact)) {
- DRWArmaturePasses passes = {
- .bone_solid = psl->bone_solid,
- .bone_outline = psl->bone_outline,
- .bone_wire = psl->bone_wire,
- .bone_envelope = psl->bone_envelope,
- .bone_axes = psl->bone_axes,
- .relationship_lines = NULL, /* Don't draw relationship lines */
- };
- DRW_shgroup_armature_object(ob, view_layer, passes);
+ if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_ARMATURE)
+ {
+ bArmature *arm = ob->data;
+ if (arm->edbo == NULL) {
+ if (DRW_state_is_select() || !DRW_pose_mode_armature(ob, draw_ctx->obact)) {
+ DRWArmaturePasses passes = {
+ .bone_solid = psl->bone_solid,
+ .bone_outline = psl->bone_outline,
+ .bone_wire = psl->bone_wire,
+ .bone_envelope = psl->bone_envelope,
+ .bone_axes = psl->bone_axes,
+ .relationship_lines = NULL, /* Don't draw relationship lines */
+ };
+ DRW_shgroup_armature_object(ob, view_layer, passes);
+ }
}
}
break;