[Bf-blender-cvs] [0492e56fece] blender2.8: Fix: When trying to transform animated bones, they would jump to and use random old values

Joshua Leung noreply at git.blender.org
Sat May 19 19:55:02 CEST 2018


Commit: 0492e56fece3e0c7d7d43a8d06b393bc9f911fa2
Author: Joshua Leung
Date:   Sat May 19 19:53:50 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB0492e56fece3e0c7d7d43a8d06b393bc9f911fa2

Fix: When trying to transform animated bones, they would jump to and use random old values

The transform code needed to use data from the "_eval" copy of the posebone
instead of the main-db version, otherwise the initial/reset value would be
wrong, causing the jumping.

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

M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 55835abc7bf..73a722d897d 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -564,10 +564,10 @@ static void add_pose_transdata(
 	td->protectflag = pchan->protectflag;
 
 	td->loc = pchan->loc;
-	copy_v3_v3(td->iloc, pchan->loc);
+	copy_v3_v3(td->iloc, pchan_eval->loc);
 
 	td->ext->size = pchan->size;
-	copy_v3_v3(td->ext->isize, pchan->size);
+	copy_v3_v3(td->ext->isize, pchan_eval->size);
 
 	if (pchan->rotmode > 0) {
 		td->ext->rot = pchan->eul;
@@ -575,7 +575,7 @@ static void add_pose_transdata(
 		td->ext->rotAngle = NULL;
 		td->ext->quat = NULL;
 
-		copy_v3_v3(td->ext->irot, pchan->eul);
+		copy_v3_v3(td->ext->irot, pchan_eval->eul);
 	}
 	else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
 		td->ext->rot = NULL;
@@ -583,8 +583,8 @@ static void add_pose_transdata(
 		td->ext->rotAngle = &pchan->rotAngle;
 		td->ext->quat = NULL;
 
-		td->ext->irotAngle = pchan->rotAngle;
-		copy_v3_v3(td->ext->irotAxis, pchan->rotAxis);
+		td->ext->irotAngle = pchan_eval->rotAngle;
+		copy_v3_v3(td->ext->irotAxis, pchan_eval->rotAxis);
 	}
 	else {
 		td->ext->rot = NULL;
@@ -592,7 +592,7 @@ static void add_pose_transdata(
 		td->ext->rotAngle = NULL;
 		td->ext->quat = pchan->quat;
 
-		copy_qt_qt(td->ext->iquat, pchan->quat);
+		copy_qt_qt(td->ext->iquat, pchan_eval->quat);
 	}
 	td->ext->rotOrder = pchan->rotmode;



More information about the Bf-blender-cvs mailing list