[Bf-blender-cvs] [50452f5] blender-v2.78-release: Fix T49323: Ineffective bone roll calculation with low rig scale

Sergey Sharybin noreply at git.blender.org
Wed Sep 14 10:39:02 CEST 2016


Commit: 50452f5b675bd75109b2364a217d4968cbb5fba8
Author: Sergey Sharybin
Date:   Tue Sep 13 12:38:47 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rB50452f5b675bd75109b2364a217d4968cbb5fba8

Fix T49323: Ineffective bone roll calculation with low rig scale

The code was expecting vector to be normalized, however after
applying inverted object matrix it was possible to have scale
applied to it.

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

M	source/blender/editors/armature/armature_edit.c

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

diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 354b748..ece0f18 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -410,6 +410,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
 			if (type < 3) vec[type] = 1.0f;
 			else vec[type - 2] = -1.0f;
 			mul_m3_v3(imat, vec);
+			normalize_v3(vec);
 		}
 		
 		if (axis_flip) negate_v3(vec);




More information about the Bf-blender-cvs mailing list