[Bf-blender-cvs] [7fbe91e] BendyBones: Version patching fixes for the new bbone settings
Joshua Leung
noreply at git.blender.org
Tue May 17 16:40:15 CEST 2016
Commit: 7fbe91e300bb1fa5cbea2a1fcf64bb8513697aab
Author: Joshua Leung
Date: Fri Jan 29 01:20:33 2016 +1300
Branches: BendyBones
https://developer.blender.org/rB7fbe91e300bb1fa5cbea2a1fcf64bb8513697aab
Version patching fixes for the new bbone settings
===================================================================
M source/blender/blenloader/intern/versioning_270.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index efd167d..a10f158 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -34,6 +34,7 @@
/* allow readfile to use deprecated functionality */
#define DNA_DEPRECATED_ALLOW
+#include "DNA_armature_types.h"
#include "DNA_brush_types.h"
#include "DNA_camera_types.h"
#include "DNA_cloth_types.h"
@@ -161,6 +162,16 @@ static void do_version_action_editor_properties_region(ListBase *regionbase)
}
}
+static void do_version_bones_super_bbone(ListBase *lb)
+{
+ for (Bone *bone = lb->first; bone; bone = bone->next) {
+ bone->scaleIn = 1.0f;
+ bone->scaleOut = 1.0f;
+
+ do_version_bones_super_bbone(&bone->childbase);
+ }
+}
+
void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
{
if (!MAIN_VERSION_ATLEAST(main, 270, 0)) {
@@ -1151,4 +1162,12 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
+
+
+ if (!DNA_struct_elem_find(fd->filesdna, "Bone", "float", "scaleIn")) {
+ printf("fixing bones\n");
+ for (bArmature *arm = main->armature.first; arm; arm = arm->id.next) {
+ do_version_bones_super_bbone(&arm->bonebase);
+ }
+ }
}
More information about the Bf-blender-cvs
mailing list