From acdb14d264c8b4eced645673f8ae8af1a96b1a90 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 22 Aug 2019 13:45:31 +1000 Subject: Transform: option to transform origins in object mode Currently supports mesh, armature, lattice, curve & metaballs. Access from pivot popover. --- source/blender/blenkernel/intern/lattice.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/blenkernel/intern/lattice.c') diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 0ceca1206f6..e46b7ca5130 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -1073,6 +1073,16 @@ float (*BKE_lattice_vert_coords_alloc(const Lattice *lt, int *r_vert_len))[3] return vert_coords; } +void BKE_lattice_vert_coords_apply_with_mat4(struct Lattice *lt, + const float (*vertexCos)[3], + const float mat[4][4]) +{ + int i, numVerts = lt->pntsu * lt->pntsv * lt->pntsw; + for (i = 0; i < numVerts; i++) { + mul_v3_m4v3(lt->def[i].vec, mat, vertexCos[i]); + } +} + void BKE_lattice_vert_coords_apply(Lattice *lt, const float (*vert_coords)[3]) { const int vert_len = lt->pntsu * lt->pntsv * lt->pntsw; -- cgit v1.2.3