diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-01 12:25:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-01 12:25:27 +0400 |
commit | 0baec4cf2dcaf2b07d9a0b00ccd7bf8288e0347e (patch) | |
tree | 9720df5d33a02b60d0635272d40c6e6c8abf74be /source/blender/editors/sculpt_paint/paint_vertex.c | |
parent | e9208e99b7663b7a81f3762ae8ed429d9e5f4cd7 (diff) |
fix [#35858] there were two bugs here, hidden faces were occluding in vertex selection mode.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 1f2c1bc7ca3..173a76a54e8 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2342,10 +2342,16 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P /* which faces are involved */ if (use_depth) { if (wp->flag & VP_AREA) { + char editflag_prev = me->editflag; + /* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */ me->editflag &= ~ME_EDIT_PAINT_VERT_SEL; + if (use_vert_sel) { + /* Ugly x2, we need this so hidden faces don't draw */ + me->editflag |= ME_EDIT_PAINT_FACE_SEL; + } totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure); - me->editflag |= use_vert_sel ? ME_EDIT_PAINT_VERT_SEL : 0; + me->editflag = editflag_prev; } else { indexar[0] = view3d_sample_backbuf(vc, mval[0], mval[1]); |