diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-23 05:02:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-23 05:02:25 +0300 |
commit | 101ec2f3b814b6cc03e550ca0d0987d11b0847ca (patch) | |
tree | 86be22d4a6e0b8b8c8ed9214f2add4e4a73aef5b /source/blender/blenloader | |
parent | f6f4ab3ebfe4772dcc0a47a2f54121017d5181d1 (diff) | |
parent | c3accabef9097c2657e9407c2ef9c9d994c008c3 (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index b90413aa5ca..329767ef202 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -4998,19 +4998,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - #do_versions_after_linking_280 in this file. - * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 283, 14)) { /* Solidify modifier merge tolerance. */ if (!DNA_struct_elem_find(fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) { for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { @@ -5023,5 +5011,43 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* Enumerator was incorrect for a time in 2.83 development. + * Note that this only corrects values known to be invalid. */ + for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { + RigidBodyCon *rbc = ob->rigidbody_constraint; + if (rbc != NULL) { + enum { + INVALID_RBC_TYPE_SLIDER = 2, + INVALID_RBC_TYPE_6DOF_SPRING = 4, + INVALID_RBC_TYPE_MOTOR = 7, + }; + switch (rbc->type) { + case INVALID_RBC_TYPE_SLIDER: + rbc->type = RBC_TYPE_SLIDER; + break; + case INVALID_RBC_TYPE_6DOF_SPRING: + rbc->type = RBC_TYPE_6DOF_SPRING; + break; + case INVALID_RBC_TYPE_MOTOR: + rbc->type = RBC_TYPE_MOTOR; + break; + } + } + } + } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - #do_versions_after_linking_280 in this file. + * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ } } |