From 0baec4cf2dcaf2b07d9a0b00ccd7bf8288e0347e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 1 Jul 2013 08:25:27 +0000 Subject: fix [#35858] there were two bugs here, hidden faces were occluding in vertex selection mode. --- source/blender/editors/sculpt_paint/paint_vertex.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint') 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]); -- cgit v1.2.3