From efa2ffaa2d2763391bf3a67fd6fc99bd1bfd2bc4 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Thu, 6 Feb 2020 11:18:41 +0100 Subject: Lattice Modifier add invert vgroup option 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. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6747 --- source/blender/makesdna/DNA_modifier_types.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_modifier_types.h') diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 39efe838bab..631a995c743 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -182,9 +182,15 @@ typedef struct LatticeModifierData { /** Optional vertexgroup name, MAX_VGROUP_NAME. */ char name[64]; float strength; - char _pad[4]; + short flag; + char _pad[2]; } LatticeModifierData; +/*Lattice modifier flags */ +enum { + MOD_LATTICE_INVERT_VGROUP = (1 << 0), +}; + typedef struct CurveModifierData { ModifierData modifier; -- cgit v1.2.3