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:
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index aca8d2f3439..9278ff51b8d 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -519,6 +519,20 @@ static void do_versions_point_attributes(CustomData *pdata)
}
}
+static void do_versions_point_attribute_names(CustomData *pdata)
+{
+ /* Change from capital initial letter to lower case (T82693). */
+ for (int i = 0; i < pdata->totlayer; i++) {
+ CustomDataLayer *layer = &pdata->layers[i];
+ if (layer->type == CD_PROP_FLOAT3 && STREQ(layer->name, "Position")) {
+ STRNCPY(layer->name, "position");
+ }
+ else if (layer->type == CD_PROP_FLOAT && STREQ(layer->name, "Radius")) {
+ STRNCPY(layer->name, "radius");
+ }
+ }
+}
+
/* Move FCurve handles towards the control point in such a way that the curve itself doesn't
* change. Since 2.91 FCurves are computed slightly differently, which requires this update to keep
* the same animation result. Previous versions scaled down overlapping handles during evaluation.
@@ -1201,5 +1215,13 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ /* Hair and PointCloud attributes names. */
+ LISTBASE_FOREACH (Hair *, hair, &bmain->hairs) {
+ do_versions_point_attribute_names(&hair->pdata);
+ }
+ LISTBASE_FOREACH (PointCloud *, pointcloud, &bmain->pointclouds) {
+ do_versions_point_attribute_names(&pointcloud->pdata);
+ }
}
}