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:
authorCody Winchester <CodyWinch>2020-02-06 13:18:41 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-02-06 13:29:59 +0300
commitefa2ffaa2d2763391bf3a67fd6fc99bd1bfd2bc4 (patch)
tree4d3d477f6ce48d84a993865b2be60eee3c439150 /source/blender/makesrna
parent2c5379b405d8baf6220e390b81a0d48409aeef75 (diff)
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
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 6f2f12ebf98..aebee811428 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1936,6 +1936,11 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_name_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_LATTICE_INVERT_VGROUP);
+ RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 10, 2);