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:
authorFalk David <falkdavid@gmx.de>2021-04-22 08:25:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-22 09:31:41 +0300
commit00ec99050ea435cb255bb81437b381e5a42660af (patch)
tree4c12734f64d00903d4556e47edc9c25205a7a8f8 /source/blender/blenloader/intern/versioning_290.c
parenta43d644decb27a0cf00da92afee71439f6d60d53 (diff)
Fix T85051: Add bisect distance as a parameter to the mirror modifier
The `bisect_distance` in the mirror modifier was hard-coded to `0.001`. This would result in some unexpected behavior like vertices close to the mirror plane being deleted or merged. The fix now adds a parameter to the mirror modifier to expose the bisect distance to the user. The default is set to the previous hard-coded value to not "change" previous files. Ref D10201
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 916c4bf0cad..fe8e46e8928 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -2059,6 +2059,19 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ /* Set default value for the new bisect_threshold parameter in the mirror modifier. */
+ if (!MAIN_VERSION_ATLEAST(bmain, 293, 19)) {
+ LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+ LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
+ if (md->type == eModifierType_Mirror) {
+ MirrorModifierData *mmd = (MirrorModifierData *)md;
+ /* This was the previous hard-coded value. */
+ mmd->bisect_threshold = 0.001f;
+ }
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*