diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 13:20:18 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 13:20:18 +0300 |
commit | 3bd057d47284d727dadb6fd826bf55143a00ad97 (patch) | |
tree | 81b2ec88c6b1dabf7a6482d19743c2071c6f0441 /source/blender/draw/modes/paint_weight_mode.c | |
parent | bfcd25b313998d5d62e927f80a837555c5113de7 (diff) |
Texture Paint: fix wireframe and hiding not working with subsurf.
The editflag field is only valid in the original mesh instance.
Diffstat (limited to 'source/blender/draw/modes/paint_weight_mode.c')
-rw-r--r-- | source/blender/draw/modes/paint_weight_mode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/modes/paint_weight_mode.c b/source/blender/draw/modes/paint_weight_mode.c index 9060a97f412..935c236410e 100644 --- a/source/blender/draw/modes/paint_weight_mode.c +++ b/source/blender/draw/modes/paint_weight_mode.c @@ -184,11 +184,11 @@ static void PAINT_WEIGHT_cache_populate(void *vedata, Object *ob) const View3D *v3d = draw_ctx->v3d; if ((ob->type == OB_MESH) && (ob == draw_ctx->obact)) { - const Mesh *me = ob->data; + const Mesh *me_orig = DEG_get_original_object(ob)->data; const bool use_wire = (v3d->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE) != 0; const bool use_surface = v3d->overlay.weight_paint_mode_opacity != 0.0f; - const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; - const bool use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; + const bool use_face_sel = (me_orig->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; + const bool use_vert_sel = (me_orig->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; struct GPUBatch *geom; if (use_surface) { |