diff options
author | Christian Friedrich <rbx775> | 2020-12-02 12:35:04 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-12-02 13:20:03 +0300 |
commit | e4204a3979c4ffba0f90dac1ba6a2cc72fde96c3 (patch) | |
tree | 4a49f91ddbab450fc48a3e9db78614531511a3c4 /source/blender/blenloader | |
parent | 84451f89f5c1ca84a3647da6906f95f6fe9f6c1f (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/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 41064b6b136..aca8d2f3439 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -1189,5 +1189,17 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + LISTBASE_FOREACH (Object *, ob, &bmain->objects) { + LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { + if (md->type == eModifierType_WeightVGProximity) { + WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *)md; + if (wmd->cmap_curve == NULL) { + wmd->cmap_curve = BKE_curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); + BKE_curvemapping_init(wmd->cmap_curve); + } + } + } + } } } |