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/blenloader/intern
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/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c12
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);
+ }
+ }
+ }
+ }
}
}