diff options
author | Hans Goudey <h.goudey@me.com> | 2022-07-20 05:50:45 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-07-20 05:50:45 +0300 |
commit | 8c5d90f5ce928e45249ddd9f642c24b6dd69d64c (patch) | |
tree | ccbbf8f065eadbe85cdc1f8d70a9d036e9c030b5 /source/blender/blenkernel/intern/paint.c | |
parent | 111bf7d76b080555fd524b2b4a138bcad2e5b206 (diff) | |
parent | 215f805ce6b540177dedd71721e62c56a764a5ea (diff) |
Merge branch 'master' into temp-legacy-mesh-format-optiontemp-legacy-mesh-format-option
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 89cc25b31e6..9b0d15ac702 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -996,6 +996,12 @@ bool BKE_paint_select_elem_test(Object *ob) return (BKE_paint_select_vert_test(ob) || BKE_paint_select_face_test(ob)); } +bool BKE_paint_always_hide_test(Object *ob) +{ + return ((ob != NULL) && (ob->type == OB_MESH) && (ob->data != NULL) && + (ob->mode & OB_MODE_WEIGHT_PAINT || ob->mode & OB_MODE_VERTEX_PAINT)); +} + void BKE_paint_cavity_curve_preset(Paint *p, int preset) { CurveMapping *cumap = NULL; @@ -2255,12 +2261,7 @@ PBVH *BKE_sculpt_object_pbvh_ensure(Depsgraph *depsgraph, Object *ob) return NULL; } - bool respect_hide = true; - if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) { - if (!(BKE_paint_select_vert_test(ob) || BKE_paint_select_face_test(ob))) { - respect_hide = false; - } - } + const bool respect_hide = true; PBVH *pbvh = ob->sculpt->pbvh; if (pbvh != NULL) { |