diff options
Diffstat (limited to 'source/blender/python/mathutils/mathutils_bvhtree.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils_bvhtree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c index ead255a6716..4ce2fcaae4a 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.c +++ b/source/blender/python/mathutils/mathutils_bvhtree.c @@ -1148,12 +1148,12 @@ static PyObject *C_BVHTree_FromObject(PyObject *UNUSED(cls), PyObject *args, PyO coords = MEM_mallocN(sizeof(*coords) * (size_t)coords_len, __func__); tris = MEM_mallocN(sizeof(*tris) * (size_t)tris_len, __func__); - MVert *mv = mesh->mvert; - for (int i = 0; i < mesh->totvert; i++, mv++) { - copy_v3_v3(coords[i], mv->co); + const MVert *verts = BKE_mesh_vertices(mesh); + for (int i = 0; i < mesh->totvert; i++) { + copy_v3_v3(coords[i], verts[i].co); } - mloop = mesh->mloop; + mloop = BKE_mesh_loops(mesh); } { |