diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-01 15:47:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-01 15:47:47 +0400 |
commit | e4f65749f9c522476f646004c06556b0fc5c4b4d (patch) | |
tree | 7c27af81dc012a3f2332c6820fe93fc915fffe91 /source/blender/editors/space_view3d/drawmesh.c | |
parent | b79ec3ac2edf58749889275f45779f745ffbad04 (diff) |
remove vertex selection check for weight paint mode so you can paint `through` the mesh.
also made the wire draw without depth masking when the depth check is off, similar to mesh editmode drawing, nice hint about whats going on.
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index ad7d3b1bddd..0e86438997c 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -1066,12 +1066,18 @@ void draw_mesh_paint(View3D *v3d, RegionView3D *rv3d, draw_mesh_face_select(rv3d, me, dm); } else if ((do_light == FALSE) || (ob->dtx & OB_DRAWWIRE)) { + const int use_depth = (v3d->flag & V3D_ZBUF_SELECT); /* weight paint in solid mode, special case. focus on making the weights clear * rather than the shading, this is also forced in wire view */ - bglPolygonOffset(rv3d->dist, 1.0); - glDepthMask(0); /* disable write in zbuffer, selected edge wires show better */ + if (use_depth) { + bglPolygonOffset(rv3d->dist, 1.0); + glDepthMask(0); /* disable write in zbuffer, selected edge wires show better */ + } + else { + glDisable(GL_DEPTH_TEST); + } glEnable(GL_BLEND); glColor4ub(255, 255, 255, 96); @@ -1080,8 +1086,14 @@ void draw_mesh_paint(View3D *v3d, RegionView3D *rv3d, dm->drawEdges(dm, 1, 1); - bglPolygonOffset(rv3d->dist, 0.0); - glDepthMask(1); + if (use_depth) { + bglPolygonOffset(rv3d->dist, 0.0); + glDepthMask(1); + } + else { + glEnable(GL_DEPTH_TEST); + } + glDisable(GL_LINE_STIPPLE); glDisable(GL_BLEND); } |