diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-01-17 17:30:20 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-01-17 17:30:20 +0400 |
commit | 25e3b647b198d3eeb14345ccbeb6ce96e23c2cf9 (patch) | |
tree | 1fac56629855ca2e27b461c4f2a3782358922f64 /build_files | |
parent | f3e39fc8c9d83fff1e4d591b27073586d855bdc6 (diff) |
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()).
Diffstat (limited to 'build_files')
0 files changed, 0 insertions, 0 deletions