Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-04 17:27:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-04 17:27:23 +0300
commit03ff3aebc4e12a5274644e5595c8995fc2fc8638 (patch)
treee5d2e22b9c82ce43cdcff829ccc04bbb1f8da9b3 /source/blender/draw/modes/paint_weight_mode.c
parentc76752372784ce44d1647df77109b2813bdd67eb (diff)
Weight Paint: draw from original mesh
Selection changes weren't showing.
Diffstat (limited to 'source/blender/draw/modes/paint_weight_mode.c')
-rw-r--r--source/blender/draw/modes/paint_weight_mode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/modes/paint_weight_mode.c b/source/blender/draw/modes/paint_weight_mode.c
index 2b510a9a4c9..14fae743d8c 100644
--- a/source/blender/draw/modes/paint_weight_mode.c
+++ b/source/blender/draw/modes/paint_weight_mode.c
@@ -38,6 +38,8 @@
#include "BKE_mesh.h"
+#include "DEG_depsgraph_query.h"
+
extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */
extern struct GlobalsUboStorage ts; /* draw_common.c */
@@ -181,6 +183,8 @@ 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)) {
+ /* 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.weight_paint_mode_opacity != 0.0f;