Page MenuHome
Paste P967

T54526_snippet_1
ActivePublic

Authored by Philipp Oeser (lichtwerk) on May 7 2019, 7:47 PM.
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index db158ca8fb2..c1dd62d2719 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -526,9 +526,12 @@ void BKE_mesh_remap_calc_verts_from_mesh(const int mode,
if (mode == MREMAP_MODE_VERT_NEAREST) {
BKE_bvhtree_from_mesh_get(&treedata, me_src, BVHTREE_FROM_VERTS, 2);
- nearest.index = -1;
+ //nearest.index = -1;
for (i = 0; i < numverts_dst; i++) {
+ /* resetting index here would work */
+ nearest.index = -1;
+
copy_v3_v3(tmp_co, verts_dst[i].co);
/* Convert the vertex to tree coordinates, if needed. */