Fix T58763: Sample color fails with mirror modifier

This commit is contained in:
Campbell Barton 2019-03-18 20:01:59 +11:00
parent 1d1e06b376
commit 794aef3f25
Notes: blender-bot 2023-02-14 04:42:40 +01:00
Referenced by issue #58763, "Sample colour" picks incorrect colour if Mirror modifier exists on mesh
1 changed files with 4 additions and 1 deletions

View File

@ -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};