From 26ef4fa85ef4ea0f010f31c93d1086c515c3b5d4 Mon Sep 17 00:00:00 2001 From: Cody Winchester Date: Tue, 24 Mar 2020 17:48:46 +0100 Subject: Modifiers: Vertex Weight Edit add invert curve falloff option This commit adds the option to invert the resulting weights of the falloff curve. There is a workflow used by some to convert a texture mask into vertex weights by using a custom curve and inverting the points. This allows the same effect with a single click, and gives the modifier more procedural functionality. With minor UI tweaks by @mont29. Differential Revision: https://developer.blender.org/D6899 --- source/blender/makesrna/intern/rna_modifier.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index a91dd2e33c7..a42c3e6a171 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -4862,6 +4862,11 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_INVERT_VGROUP_MASK); RNA_def_property_ui_text(prop, "Invert", "Invert vertex group mask influence"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "invert_falloff", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_INVERT_FALLOFF); + RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); } static void rna_def_modifier_weightvgmix(BlenderRNA *brna) -- cgit v1.2.3