diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-11-23 13:11:39 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-12-24 19:58:09 +0300 |
commit | 33eabb82207e165de45fb6a0ea74dec962de7265 (patch) | |
tree | 714a714819fe27d1f998b0a3c3c7824e786be9ac /source/blender/blenlib/BLI_math_matrix.h | |
parent | 9378debd26f7b20babcc251bdef64563a56c6ae0 (diff) |
Action Constraint: introduce a mix mode setting.
Currently the action channels are applied after the existing
transformation, as if the action controlled a child of the
bone. This is not very natural, but more importantly, the
transform tools are not designed to work conveniently with an
additional 'pseudo-child' transformation, resulting in effects
like an unexpected pivot location.
Implementing a Before mode that integrates the action channels
as if applied to a parent allows using the special transform
tool code intended for dealing with such constraints.
Note that in either mode, Action constraints should be added
in reverse order, putting a new constraint before the existing
ones that the Action was keyframed to work together.
In order to implement the option, extract a utility from
the Copy Transform constraint code for combining transforms
with special anti-shear scale handling that matches the
Aligned Inherit Scale mode.
The Before mode also requires switching the constraint to
the Local owner space, while the After mode can still use the
World space for efficiency as before. Since the constraint
doesn't have an Owner space option in the UI, this has to be
handled in an RNA setter.
For full backward compatibility, the original simple matrix
multiplication mode is preserved as the third option, but it
is not recommended due to creating shear.
Differential Revision: https://developer.blender.org/D6297
Diffstat (limited to 'source/blender/blenlib/BLI_math_matrix.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_matrix.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 814b13fa47f..ac0f5f44c74 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -205,6 +205,8 @@ void mul_transposed_m3_v3(const float M[3][3], float r[3]); void mul_transposed_mat3_m4_v3(const float M[4][4], float r[3]); void mul_m3_v3_double(const float M[3][3], double r[3]); +void mul_m4_m4m4_aligned_scale(float R[4][4], const float A[4][4], const float B[4][4]); + void mul_m3_fl(float R[3][3], float f); void mul_m4_fl(float R[4][4], float f); void mul_mat3_m4_fl(float R[4][4], float f); |