Blender Git Commit Log

Git Commits -> Revision f38454b

Revision f38454b by Alexander Gavrilov
December 1, 2020, 18:31 (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: f38454bf9e00e645f96e2bed085e1ed8d5da8753
Parent Commit: b52d792
Lines Changed: +163, -10

6 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/makesdna/DNA_constraint_types.h (+18, -1) (Diff)
/source/blender/makesrna/intern/rna_constraint.c (+51, -6) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021