diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-23 00:46:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-23 00:46:26 +0300 |
commit | 4c24782ccf35a58edb8c9b33d0594b278715a6ec (patch) | |
tree | f64d8982fe357d167e3a53478403fa7a69f50fb9 /source/blender/draw/intern/draw_cache.c | |
parent | 69529177be11be25b5a929c658af66612101d87b (diff) |
DRW: only show hidden geometry when selection is used
Matches 2.7x behavior.
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 6fe477b50c6..07695702cab 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -40,6 +40,7 @@ #include "BLI_listbase.h" #include "BKE_object.h" +#include "BKE_paint.h" #include "BKE_object_deform.h" #include "GPU_batch.h" @@ -3753,8 +3754,11 @@ void drw_batch_cache_generate_requested(Object *ob) const ToolSettings *ts = draw_ctx->scene->toolsettings; const int mode = CTX_data_mode_enum_ex(draw_ctx->object_edit, draw_ctx->obact, draw_ctx->object_mode); const bool is_paint_mode = ELEM(mode, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT); - const bool use_hide = (ob->type == OB_MESH) && ((is_paint_mode && (ob == draw_ctx->obact)) || - ((mode == CTX_MODE_EDIT_MESH) && BKE_object_is_in_editmode(ob))); + const bool use_hide = ( + (ob->type == OB_MESH) && + ((is_paint_mode && (ob == draw_ctx->obact) && + (BKE_paint_select_face_test(ob) || BKE_paint_select_vert_test(ob))) || + ((mode == CTX_MODE_EDIT_MESH) && BKE_object_is_in_editmode(ob)))); struct Mesh *mesh_eval = ob->runtime.mesh_eval; switch (ob->type) { |