Blender Git Commit Log

Git Commits -> Revision 65a8070

Revision 65a8070 by Bastien Montagne (master)
September 4, 2015, 14:50 (GMT)
Fix T46010: Bone offset between Rest Pose and Edit mode.

That one was hairy... To summarize:
* We were setting Bone.head/tail (aka **local** rest location of bone) from EditBone data, using **EditBone's parent computed armature space**.
* We use those local head/tail to define Bone's restpose (in `BKE_armature_where_is_bone()`), using **Bone's parent armature space** (aka parent's arm_mat).
* Because of bone's roll nightmare, the two above parent's matrices will often not be the same.
In an ideal world, this should not affect locations (head/tail), but in real world of float it does - noticeably, in some extreme cases.

So! This commit cleans up things a bit (`fix_bonelist_roll()` was already doing much more than just fixing roll mess, has been renamed
to `armature_finalize_restpose()`), and ensures we do use (final!) parent's arm_mat local space to compute children's local head/tail as well.
This allows us to avoid too much imprecision here.

Checked the patch also with a complete Victor's rig from Gooseberry, seems to have no nasty side effects - fingers crossed!

Commit Details:

Full Hash: 65a80708d4ca0d28a9c6e35bf7429693b806e0b4
Parent Commit: c882cbd
Lines Changed: +70, -60

1 Modified Path:

/source/blender/editors/armature/armature_utils.c (+70, -60) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021