diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-08 08:17:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-08 08:17:30 +0300 |
commit | b6dba5caac17522d695ee2d40699178f32e35444 (patch) | |
tree | 976ea32e3acd70aab2cf599ae0325333e19496d1 /source/blender/draw/modes/paint_vertex_mode.c | |
parent | cb15854bf91e0d5229d73b5859b5e132a55217b0 (diff) |
Vertex Paint: use original mesh data
This is already done in weight paint mode,
avoids a mesh refresh on selection changes.
Diffstat (limited to 'source/blender/draw/modes/paint_vertex_mode.c')
-rw-r--r-- | source/blender/draw/modes/paint_vertex_mode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c index bbe17415da1..236f76367d4 100644 --- a/source/blender/draw/modes/paint_vertex_mode.c +++ b/source/blender/draw/modes/paint_vertex_mode.c @@ -36,6 +36,8 @@ #include "DNA_mesh_types.h" #include "DNA_view3d_types.h" +#include "DEG_depsgraph_query.h" + extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */ extern struct GlobalsUboStorage ts; /* draw_common.c */ @@ -147,6 +149,8 @@ static void PAINT_VERTEX_cache_populate(void *vedata, Object *ob) const View3D *v3d = draw_ctx->v3d; if ((ob->type == OB_MESH) && (ob == draw_ctx->obact)) { + /* We're always painting on original, display original data. */ + ob = DEG_get_original_object(ob); const Mesh *me = ob->data; const bool use_wire = (v3d->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE) != 0; const bool use_surface = v3d->overlay.vertex_paint_mode_opacity != 0.0f; |