Commit: d32188b85bf031f316bf0ae284805c5934fdee9c Author: Jacques Lucke Date: Wed Oct 28 20:15:43 2020 +0100 Branches: master https://developer.blender.org/rBd32188b85bf031f316bf0ae284805c5934fdee9c
Mesh: Fix BKE_mesh_translate changes referenced layer This is the same fix that is implemented in rB3791dbea1e79. =================================================================== M source/blender/blenkernel/intern/mesh.c =================================================================== diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 97520654e7b..2d2519ada59 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1495,8 +1495,11 @@ void BKE_mesh_transform(Mesh *me, const float mat[4][4], bool do_keys) void BKE_mesh_translate(Mesh *me, const float offset[3], const bool do_keys) { + MVert *mvert = CustomData_duplicate_referenced_layer(&me->vdata, CD_MVERT, me->totvert); + /* If the referenced layer has been re-allocated need to update pointers stored in the mesh. */ + BKE_mesh_update_customdata_pointers(me, false); + int i = me->totvert; - MVert *mvert; for (mvert = me->mvert; i--; mvert++) { add_v3_v3(mvert->co, offset); } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs