diff options
author | Jacques Lucke <jacques@blender.org> | 2022-05-05 13:11:50 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-05-05 13:11:50 +0300 |
commit | dbba5c4df973a0120ed9ed115cd9044b2f1d24a5 (patch) | |
tree | a3ad2b032626204fd903577017d5a38894947b42 /source/blender/blenloader | |
parent | b4fa74e812939fdfbcb430013b63020257cdac27 (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.c | 10 |
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; + } + } } } |