Blender Git Commit Log

Git Commits -> Revision 48614fb

Revision 48614fb by Campbell Barton (master)
December 7, 2010, 01:56 (GMT)
Added an assert() check for normalized quats which exposed a number of bugs where normalized quat was incorrectly assumed.
This would have made bug #25003 very simple to find.

- Objects had their quats normalized when calculating their matrix, this is inconstant with pose bones and isn't useful for animation.
Also it wasn't normalizing the delta rotation so these would give bad rotations.

- Converting between rotation modes BKE_rotMode_change_values() assumed normal length quat. changing quat to euler rotation for eg could change the bone.

- Clear rotation and transform were not normalizing the quat when 4d loc was disabled on quat rotation, corrected and also made it so the quat scale is restored after conversion so animations curves dont jump.

There is 1 case in mat3_to_quat_is_ok() where quat_to_mat3 on an unnormalized quat is needed, for this I had to add an ugly static function quat_to_mat3_no_assert(), but overall its worthwhile IMHO to be able to find incorrect use of rotation conversion.

Commit Details:

Full Hash: 48614fbc2af024d613845b03d632e544f8127261
SVN Revision: 33523
Parent Commit: fe0f78a
Lines Changed: +81, -34

7 Modified Paths:

/source/blender/blenkernel/intern/anim.c (+9, -5) (Diff)
/source/blender/blenkernel/intern/armature.c (+3, -2) (Diff)
/source/blender/blenkernel/intern/object.c (+9, -5) (Diff)
/source/blender/blenlib/BLI_math_rotation.h (+3, -2) (Diff)
/source/blender/blenlib/intern/math_rotation.c (+33, -5) (Diff)
/source/blender/editors/armature/editarmature.c (+9, -5) (Diff)
/source/blender/editors/transform/transform.c (+15, -10) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021