diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_util.cc')
-rw-r--r-- | source/blender/modifiers/intern/MOD_util.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.cc b/source/blender/modifiers/intern/MOD_util.cc index a94fc6732a0..b72bd32b54e 100644 --- a/source/blender/modifiers/intern/MOD_util.cc +++ b/source/blender/modifiers/intern/MOD_util.cc @@ -131,17 +131,17 @@ void MOD_get_texture_coords(MappingInfoModifierData *dmd, texmapping = MOD_DISP_MAP_LOCAL; } - const MVert *mv = BKE_mesh_verts(mesh); - for (i = 0; i < verts_num; i++, mv++, r_texco++) { + const float(*positions)[3] = BKE_mesh_positions(mesh); + for (i = 0; i < verts_num; i++, r_texco++) { switch (texmapping) { case MOD_DISP_MAP_LOCAL: - copy_v3_v3(*r_texco, cos != nullptr ? *cos : mv->co); + copy_v3_v3(*r_texco, cos != nullptr ? *cos : positions[i]); break; case MOD_DISP_MAP_GLOBAL: - mul_v3_m4v3(*r_texco, ob->object_to_world, cos != nullptr ? *cos : mv->co); + mul_v3_m4v3(*r_texco, ob->object_to_world, cos != nullptr ? *cos : positions[i]); break; case MOD_DISP_MAP_OBJECT: - mul_v3_m4v3(*r_texco, ob->object_to_world, cos != nullptr ? *cos : mv->co); + mul_v3_m4v3(*r_texco, ob->object_to_world, cos != nullptr ? *cos : positions[i]); mul_m4_v3(mapref_imat, *r_texco); break; } |