Blender Git Commit Log

Git Commits -> Revision 25e3b64

Revision 25e3b64 by Bastien Montagne (master)
January 17, 2012, 13:30 (GMT)
New pchan to pose matrices computes. Fixes [#27898] Bone snap to cursor fails and [#29461] Selection-to-Cursor works strange with bones with TrackTo constraint. Also fixes some inconsistant behavior of no Inherit Rotation/Scale options.

WARNING: This commits modifies how translated unconnected child bones with *no Inherit Rotation option* are positionned. This means that if you open a posed/animated armature using such (corner-case) setup, you'll have to adjust manually the locations of such bones: now, disabling Inherit Rotation/Scale will no more move the bone, only affecting its rotation/scale.

Many thanks to Bassam Kurdali (slikdigit) for his advices and tests of the patch!

-----

Dev notes : the pchan_to_pose_mat() func was added to BKE_armature.h, which computes two matrices to get the pose transformations (pchan) of the bone directly in pose (i.e. armature object) space. The first matrix is the rotation/scaling parts, the second one is for location.

That new function is used by (hence deduplicating and simplifying their code):
* The pose evaluation code (where_is_pose_bone()).
* The interactive transformation code (add_pose_transdata(), in transform_conversion.c).
* The snap to cursor/grid code (through armature_loc_pose_to_bone()/armature_mat_pose_to_bone()).

Commit Details:

Full Hash: 25e3b647b198d3eeb14345ccbeb6ce96e23c2cf9
SVN Revision: 43450
Parent Commit: f3e39fc
Lines Changed: +240, -159

4 Modified Paths:

/source/blender/blenkernel/BKE_armature.h (+4, -0) (Diff)
/source/blender/blenkernel/intern/armature.c (+191, -141) (Diff)
/source/blender/editors/space_view3d/view3d_snap.c (+5, -10) (Diff)
/source/blender/editors/transform/transform_conversions.c (+40, -8) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021