diff options
author | Jeroen Bakker <jeroen@blender.org> | 2019-12-06 10:46:32 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2019-12-10 12:55:29 +0300 |
commit | 42a551d2ddbbd7eef8277b368245b0865b0d809b (patch) | |
tree | 788adae0fc1136d95b15b06fb71a9acca39b2ac1 | |
parent | 3ea736fb4d65b6e538972f77f8d9f3d89c96ecba (diff) |
Fix T72220: Hide Edit Overlays
The edit overlays were drawn dispite of the global hide overlays toggle.
This patch checks the global hide overlay toggle to see if it needs to draw
these overlays.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D6371
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_engine.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index 5ad24246238..41d099772ee 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -224,7 +224,7 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob) OVERLAY_pose_cache_populate(vedata, ob); } - if (in_edit_mode) { + if (in_edit_mode && !pd->hide_overlays) { switch (ob->type) { case OB_MESH: OVERLAY_edit_mesh_cache_populate(vedata, ob); @@ -281,20 +281,22 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob) OVERLAY_motion_path_cache_populate(vedata, ob); } - switch (ob->type) { - case OB_ARMATURE: - if (draw_bones && (is_select || (!in_edit_mode && !in_pose_mode))) { - OVERLAY_armature_cache_populate(vedata, ob); - } - break; - case OB_MBALL: - if (!in_edit_mode) { - OVERLAY_metaball_cache_populate(vedata, ob); - } - break; - case OB_GPENCIL: - OVERLAY_gpencil_cache_populate(vedata, ob); - break; + if (!pd->hide_overlays) { + switch (ob->type) { + case OB_ARMATURE: + if (draw_bones && (is_select || (!in_edit_mode && !in_pose_mode))) { + OVERLAY_armature_cache_populate(vedata, ob); + } + break; + case OB_MBALL: + if (!in_edit_mode) { + OVERLAY_metaball_cache_populate(vedata, ob); + } + break; + case OB_GPENCIL: + OVERLAY_gpencil_cache_populate(vedata, ob); + break; + } } /* Non-Meshes */ if (draw_extras) { |