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:
authorJoshua Leung <aligorith@gmail.com>2016-05-17 17:30:14 +0300
committerJoshua Leung <aligorith@gmail.com>2016-05-17 17:30:14 +0300
commitb2e596a7cd978476b3c0956e6d005d5740fdc721 (patch)
tree49ace019e0509cd188f24d11c8f799ab676f6bbd
parentfd95b6f82ec8f58095da96ebde5ee6f67ba7a664 (diff)
Bendy Bones: Cleaning up version patching for latest versionBendyBones
-rw-r--r--source/blender/blenloader/intern/versioning_270.c45
1 files changed, 22 insertions, 23 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 761b83e6ee7..58542d05879 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1163,30 +1163,29 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
-
- if (!DNA_struct_elem_find(fd->filesdna, "Bone", "float", "scaleIn")) {
- printf("VERSION PATCHING FOR SUPER BONES --> POST-MERGE FIXME REMINDER...\n");
- for (bArmature *arm = main->armature.first; arm; arm = arm->id.next) {
- do_version_bones_super_bbone(&arm->bonebase);
+ if (!MAIN_VERSION_ATLEAST(main, 277, 2)) {
+ if (!DNA_struct_elem_find(fd->filesdna, "Bone", "float", "scaleIn")) {
+ for (bArmature *arm = main->armature.first; arm; arm = arm->id.next) {
+ do_version_bones_super_bbone(&arm->bonebase);
+ }
}
- }
- if (!DNA_struct_elem_find(fd->filesdna, "bPoseChannel", "float", "scaleIn")) {
- printf("VERSION PATCHING FOR SUPER POSEBONES --> POST-MERGE FIXME REMINDER...\n");
- for (Object *ob = main->object.first; ob; ob = ob->id.next) {
- if (ob->pose) {
- for (bPoseChannel *pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
- /* see do_version_bones_super_bbone()... */
- pchan->scaleIn = 1.0f;
- pchan->scaleOut = 1.0f;
-
- /* also make sure some legacy (unused for over a decade) flags are unset,
- * so that we can reuse them for stuff that matters now...
- * (i.e. POSE_IK_MAT, (unknown/unused x 4), POSE_HAS_IK)
- *
- * These seem to have been runtime flags used by the IK solver, but that stuff
- * should be able to be recalculated automatically anyway, so it should be fine.
- */
- pchan->flag &= ~((1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7) | (1 << 8));
+ if (!DNA_struct_elem_find(fd->filesdna, "bPoseChannel", "float", "scaleIn")) {
+ for (Object *ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->pose) {
+ for (bPoseChannel *pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ /* see do_version_bones_super_bbone()... */
+ pchan->scaleIn = 1.0f;
+ pchan->scaleOut = 1.0f;
+
+ /* also make sure some legacy (unused for over a decade) flags are unset,
+ * so that we can reuse them for stuff that matters now...
+ * (i.e. POSE_IK_MAT, (unknown/unused x 4), POSE_HAS_IK)
+ *
+ * These seem to have been runtime flags used by the IK solver, but that stuff
+ * should be able to be recalculated automatically anyway, so it should be fine.
+ */
+ pchan->flag &= ~((1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7) | (1 << 8));
+ }
}
}
}