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:
authorJacques Lucke <jacques@blender.org>2022-05-05 13:11:50 +0300
committerJacques Lucke <jacques@blender.org>2022-05-05 13:11:50 +0300
commitdbba5c4df973a0120ed9ed115cd9044b2f1d24a5 (patch)
treea3ad2b032626204fd903577017d5a38894947b42 /source/blender/blenloader
parentb4fa74e812939fdfbcb430013b63020257cdac27 (diff)
Curves: control number of control points in new curves
Previously, the number of control points in a new curve was hardcoded. Differential Revision: https://developer.blender.org/D14857
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 1708b532b91..7fd72fec3d0 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -3024,5 +3024,15 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
FOREACH_NODETREE_END;
+
+ /* Initialize brush curves sculpt settings. */
+ LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
+ if (brush->ob_mode != OB_MODE_SCULPT_CURVES) {
+ continue;
+ }
+ if (brush->curves_sculpt_settings->points_per_curve == 0) {
+ brush->curves_sculpt_settings->points_per_curve = 8;
+ }
+ }
}
}