Blender Git Loki

Git Commits -> Revision 2fcb7a2

Revision 2fcb7a2 by Alexander Gavrilov
December 16, 2020, 10:28 (GMT)
Copy Transforms: implement Invert, Fix Shear and more Mix options.

This constraint can be naturally viewed as a prototype for a future
4x4 matrix math node (or subset thereof), since its basic semantics
already is matrix assignment. Thus it makes sense to add math options
to this constraint to increase flexibility in the meantime.

This patch adds support for several operations that would be useful:

- An option to fix shear in the incoming target matrix.
- An option to invert the target matrix.
- More ways to combine target and owner matrix.

Shear is known to cause issues for various mathematical operations,
so an option to remove it at key points is useful. In the future node
system this would be a separate operation, but due to the limits of
the constraint stack it has to be built in for now.

Inverting a matrix is also an operation that can be useful to have.
For some uses it may be useful to invert components separately, so
implement this by checking the Mix mode setting to avoid UI options.

Finally, add two more ways to combine the matrices (multiplied by
two due to the necessity for the Before/After choice). Now there
are three combine modes:

Full implements regular matrix multiplication as the most basic option.

Split Channels combines location, rotation and scale separately.
Looking at D7547 there is demand for such a mode in some cases,
and even with nodes it's cumbersome to rig manually every time.

Finally, Aligned emulates the 'anti-shear' Aligned Inherit Scale mode,
and basically uses Full for location, and Split for rotation/scale.

Differential Revision: https://developer.blender.org/D9469

Commit Details:

Full Hash: 2fcb7a22f2b0eeb50afc56e07c55e1bb436e2370
Parent Commit: 9791b0e
Lines Changed: +166, -11

7 Modified Paths:

/release/scripts/startup/bl_ui/properties_constraint.py (+2, -0) (Diff)
/source/blender/blenkernel/intern/constraint.c (+48, -3) (Diff)
/source/blender/blenlib/BLI_math_matrix.h (+3, -0) (Diff)
/source/blender/blenlib/intern/math_matrix.c (+41, -0) (Diff)
/source/blender/editors/transform/transform_convert.c (+4, -1) (Diff)
/source/blender/makesdna/DNA_constraint_types.h (+18, -1) (Diff)
/source/blender/makesrna/intern/rna_constraint.c (+50, -6) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021