[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54061] trunk/blender/source/blender/ editors: Bugfix [#33974] Bone roll flips 180 degrees when extruding bones vertically

Joshua Leung aligorith at gmail.com
Thu Jan 24 03:52:09 CET 2013


Revision: 54061
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54061
Author:   aligorith
Date:     2013-01-24 02:52:03 +0000 (Thu, 24 Jan 2013)
Log Message:
-----------
Bugfix [#33974] Bone roll flips 180 degrees when extruding bones vertically

For example, if you're making a chain of bones (e.g. for a spine) by extruding
the tip joint of an initial bone, the bone rolls would be: 0 (for the initial
bone), 180, -180, 180, -180, etc. This has the undesirable effect of causing
B-Bones to twist to match the roll values at the other end of the bone.

The fix here seems to improve the situation in this case: bone roll values don't
flip or change anymore (in fact, the bone axes stay perfectly aligned now, as
they should). It also doesn't seem to cause any problems in other common cases I
checked.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/armature/editarmature.c
    trunk/blender/source/blender/editors/transform/transform_generics.c

Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c	2013-01-24 02:14:39 UTC (rev 54060)
+++ trunk/blender/source/blender/editors/armature/editarmature.c	2013-01-24 02:52:03 UTC (rev 54061)
@@ -2002,7 +2002,7 @@
 
 	sub_v3_v3v3(nor, bone->tail, bone->head);
 	vec_roll_to_mat3(nor, 0.0f, mat);
-
+	
 	/* check the bone isn't aligned with the axis */
 	if (!is_zero_v3(align_axis) && angle_v3v3(align_axis, mat[2]) > FLT_EPSILON) {
 		float vec[3], align_axis_proj[3], roll;

Modified: trunk/blender/source/blender/editors/transform/transform_generics.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_generics.c	2013-01-24 02:14:39 UTC (rev 54060)
+++ trunk/blender/source/blender/editors/transform/transform_generics.c	2013-01-24 02:52:03 UTC (rev 54061)
@@ -819,7 +819,7 @@
 							mul_m3_v3(t->mat, up_axis);
 						}
 						
-						ebo->roll = ED_rollBoneToVector(ebo, up_axis, FALSE);
+						ebo->roll = ED_rollBoneToVector(ebo, up_axis, TRUE);
 					}
 				}
 			}




More information about the Bf-blender-cvs mailing list