[Bf-blender-cvs] [b2e596a] BendyBones: Bendy Bones: Cleaning up version patching for latest version

Joshua Leung noreply at git.blender.org
Tue May 17 16:41:00 CEST 2016


Commit: b2e596a7cd978476b3c0956e6d005d5740fdc721
Author: Joshua Leung
Date:   Wed May 18 02:30:14 2016 +1200
Branches: BendyBones
https://developer.blender.org/rBb2e596a7cd978476b3c0956e6d005d5740fdc721

Bendy Bones: Cleaning up version patching for latest version

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

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 761b83e..58542d0 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));
+					}
 				}
 			}
 		}




More information about the Bf-blender-cvs mailing list