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:
authorBastien Montagne <b.mont29@gmail.com>2020-03-24 20:28:09 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-03-24 20:28:55 +0300
commitbb26c1359e4f4bb21ec4ec4ab37e28d1fada20b8 (patch)
tree1e08863d43915ef90b59b85cd95afe6d279f50dd /source/blender/makesrna
parent26ef4fa85ef4ea0f010f31c93d1086c515c3b5d4 (diff)
Add invert mapping option to proximity weight edit modifier, and some cleanup.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index a42c3e6a171..c50e68b9465 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -4802,6 +4802,16 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */
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");
+
+ prop = RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve");
+ RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
prop = RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG);
RNA_def_property_ui_text(prop,
@@ -4827,11 +4837,6 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
"it is not in the vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop = RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve");
- RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
prop = RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "add_threshold");
RNA_def_property_range(prop, 0.0, 1.0);
@@ -4862,11 +4867,6 @@ 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)
@@ -5065,6 +5065,11 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */
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, "proximity_flags", MOD_WVG_PROXIMITY_INVERT_FALLOFF);
+ RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
/* Common masking properties. */
rna_def_modifier_weightvg_mask(brna,
srna,