diff options
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_wrapper.cc')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_wrapper.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/mesh_wrapper.cc b/source/blender/blenkernel/intern/mesh_wrapper.cc index 61a95fb4d0e..620bafa4b46 100644 --- a/source/blender/blenkernel/intern/mesh_wrapper.cc +++ b/source/blender/blenkernel/intern/mesh_wrapper.cc @@ -7,7 +7,7 @@ * output of a modified mesh. * * This API handles the case when the modifier stack outputs a mesh which does not have - * #Mesh data (#MPoly, #MLoop, #MEdge, #MVert). + * #Mesh data (#MPoly, #MLoop, #MEdge, etc). * Currently this is used so the resulting mesh can have #BMEditMesh data, * postponing the converting until it's needed or avoiding conversion entirely * which can be an expensive operation. @@ -46,6 +46,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" +using blender::float3; using blender::Span; Mesh *BKE_mesh_wrapper_from_editmesh_with_coords(BMEditMesh *em, @@ -192,9 +193,9 @@ void BKE_mesh_wrapper_vert_coords_copy(const Mesh *me, case ME_WRAPPER_TYPE_MDATA: case ME_WRAPPER_TYPE_SUBD: { BLI_assert(vert_coords_len <= me->totvert); - const Span<MVert> verts = me->verts(); + const Span<float3> positions = me->positions(); for (int i = 0; i < vert_coords_len; i++) { - copy_v3_v3(vert_coords[i], verts[i].co); + copy_v3_v3(vert_coords[i], positions[i]); } return; } @@ -230,9 +231,9 @@ void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const Mesh *me, case ME_WRAPPER_TYPE_MDATA: case ME_WRAPPER_TYPE_SUBD: { BLI_assert(vert_coords_len == me->totvert); - const Span<MVert> verts = me->verts(); + const Span<float3> positions = me->positions(); for (int i = 0; i < vert_coords_len; i++) { - mul_v3_m4v3(vert_coords[i], mat, verts[i].co); + mul_v3_m4v3(vert_coords[i], mat, positions[i]); } return; } |