Page MenuHome

Lattice Modifier add invert vgroup option
ClosedPublic

Authored by Cody Winchester (CodyWinch) on Feb 4 2020, 4:49 AM.

Details

Summary

Adds the invert vertex group option to the Lattice modifier.

Adds a short flag and modifies the existing char padding for the correct amount.
Adds a .invert_vgroup to the LatticeDeformUserdata.
Passes the flag into the lattice_deform_verts function where the weights around found and used.
For the other calls of lattice_deform_verts function they pass in NULL for the flag in the same way they pass NULL for the vgroup name.

Diff Detail

Repository
rB Blender

Event Timeline

Besides two comments below, patch is OK, will fix and commit, thanks.

source/blender/blenkernel/intern/lattice.c
216

lattice_deform_verts(ltOb, NULL, NULL, vert_coords, uNew * vNew * wNew, 0, NULL, 1.0f);, not lattice_deform_verts(ltOb, NULL, NULL, vert_coords, uNew * vNew * wNew, NULL, NULL, 1.0f);

975

lattice_deform_verts(ob->parent, ob, NULL, (float(*)[3])dl->verts, dl->nr, 0, NULL, 1.0f);, not lattice_deform_verts(ob->parent, ob, NULL, (float(*)[3])dl->verts, dl->nr, NULL, NULL, 1.0f);

This revision is now accepted and ready to land.Feb 6 2020, 11:27 AM