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:
authorChristian Friedrich <rbx775>2020-12-02 12:35:04 +0300
committerBastien Montagne <bastien@blender.org>2020-12-02 13:20:03 +0300
commite4204a3979c4ffba0f90dac1ba6a2cc72fde96c3 (patch)
tree4a49f91ddbab450fc48a3e9db78614531511a3c4 /source/blender/makesrna/intern/rna_modifier.c
parent84451f89f5c1ca84a3647da6906f95f6fe9f6c1f (diff)
Add Custom Falloff Curve to the Vertex Weight Proximity Modifier.
The Vertex Weight Edit Modifier already got the Custom Curve, there was no real reason for the proximity not to have it as well. With some fixes by Bastien Montagne (@mont29). Reviewed By: mont29 Differential Revision: https://developer.blender.org/D9594
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 2df42b87c07..c0f3197b2d1 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -5293,7 +5293,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
static const EnumPropertyItem weightvg_proximity_falloff_type_items[] = {
{MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", "Null action"},
- /* No curve mapping here! */
+ {MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""},
{MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
{MOD_WVG_MAPPING_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
{MOD_WVG_MAPPING_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
@@ -5381,6 +5381,11 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
"Normalize the resulting weights (otherwise they are only clamped within [0.0, 1.0] range)");
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");
+
RNA_define_lib_overridable(false);
/* Common masking properties. */