[Bf-blender-cvs] [86f0ddb1f57] temp-angavrilov: Temporary Hack: provide B-Bone scale versioning for files with old patch.

Alexander Gavrilov noreply at git.blender.org
Wed Sep 7 10:11:26 CEST 2022


Commit: 86f0ddb1f5705c1bed21d2d6c0f47ad5930e22cd
Author: Alexander Gavrilov
Date:   Tue Jun 22 16:38:26 2021 +0300
Branches: temp-angavrilov
https://developer.blender.org/rB86f0ddb1f5705c1bed21d2d6c0f47ad5930e22cd

Temporary Hack: provide B-Bone scale versioning for files with old patch.

Run the versioning code for the conversion of bbone scale to an xyz
vector if it has fields that correspond to the old version of the
patch before that change requiring versioning.

The actual Y (length) scale value from the old patch isn't versioned
and will be lost, requiring manual fixing.

===================================================================

M	source/blender/blenloader/intern/versioning_300.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 1692fd2d747..374b4c9d89a 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -1842,7 +1842,8 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
     }
 
     /* Initialize length-wise scale B-Bone settings. */
-    if (!DNA_struct_elem_find(fd->filesdna, "Bone", "int", "bbone_flag")) {
+    if (!DNA_struct_elem_find(fd->filesdna, "Bone", "int", "bbone_flag") ||
+        DNA_struct_elem_find(fd->filesdna, "Bone", "float", "scale_in_len")) {
       /* Update armature data and pose channels. */
       LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) {
         do_version_bones_bbone_len_scale(&arm->bonebase);



More information about the Bf-blender-cvs mailing list