Fix T65850 Sculpt: Vertices not hidden if using shape keys

This commit is contained in:
Clément Foucault 2019-07-10 13:23:47 +02:00
parent ee4fa41245
commit 56ec8108e2
Notes: blender-bot 2023-02-14 03:52:45 +01:00
Referenced by issue #65850, vertices visibility in sculpt mode using shape keys - regression
2 changed files with 3 additions and 1 deletions

View File

@ -4037,7 +4037,7 @@ void drw_batch_cache_generate_requested(Object *ob)
const enum eContextObjectMode 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);
mode, CTX_MODE_SCULPT, 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) &&

View File

@ -207,6 +207,8 @@ bool DRW_object_use_hide_faces(const struct Object *ob)
const Mesh *me = ob->data;
switch (ob->mode) {
case OB_MODE_SCULPT:
return true;
case OB_MODE_TEXTURE_PAINT:
return (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0;
case OB_MODE_VERTEX_PAINT: