Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-22 06:45:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-24 00:34:43 +0300
commitacdb14d264c8b4eced645673f8ae8af1a96b1a90 (patch)
tree0be0b3490fe79105892e309be48f608e6ed19fc5 /source/blender/blenkernel/intern/lattice.c
parent71c43e92257c671065125330f93ed4d03b2b8250 (diff)
Transform: option to transform origins in object mode
Currently supports mesh, armature, lattice, curve & metaballs. Access from pivot popover.
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c10
1 files changed, 10 insertions, 0 deletions
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;