From 794aef3f259ef0833e45d9cfd40ba6fe2b08b376 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 Mar 2019 20:01:59 +1100 Subject: Fix T58763: Sample color fails with mirror modifier --- source/blender/editors/sculpt_paint/paint_utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 7de8e6bb07f..b1088e3a957 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -460,8 +460,11 @@ void paint_sample_color(bContext *C, ARegion *ar, int x, int y, bool texpaint_pr bool use_material = (imapaint->mode == IMAGEPAINT_MODE_MATERIAL); if (ob) { + CustomData_MeshMasks cddata_masks = CD_MASK_BAREMESH; + cddata_masks.pmask |= CD_MASK_ORIGINDEX; Mesh *me = (Mesh *)ob->data; - Mesh *me_eval = ob_eval->runtime.mesh_eval; + CustomData_MeshMasks mask, nextmask, previewmask = {0}, append_mask = CD_MASK_BAREMESH_ORIGINDEX; + Mesh *me_eval = mesh_get_eval_final(depsgraph, scene, ob_eval, &cddata_masks); ViewContext vc; const int mval[2] = {x, y}; -- cgit v1.2.3