Page MenuHome

Fix T57767: Pivot point broken after scaling to 0 in a dimension
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on May 6 2019, 10:09 AM.

Details

Summary

matrix inversion was changed in rB01c75c3765eb from own code to EIGEN
for performance reasons.
EIGEN would return a zero matrix on failure (resulting in the pivot
always being at the object origin).
This bring back the "old" matrix inversion code (which has the benifit of
providing a partial solution which makes the local transform center
appear correct)

Diff Detail

Repository
rB Blender
Branch
T57767 (branched from master)
Build Status
Buildable 3515
Build 3515: arc lint + arc unit

Event Timeline

Comment inline, otherwise LGTM.

source/blender/blenlib/intern/math_matrix.c
1022

Suggest logic for using the fallback be:

if (EIG_invert_m4_m4(inverse, mat)) {
  return true;
}

... then use fallback logic ...

This way we get exact matching behavior unless EIG_invert_m4_m4 fails to invert the matrix.

Philipp Oeser (lichtwerk) marked an inline comment as done.May 7 2019, 10:32 AM
This revision is now accepted and ready to land.May 7 2019, 10:33 AM
This revision was automatically updated to reflect the committed changes.