Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-05-05 17:04:10 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-05-07 11:47:19 +0300
commit036e95bb21fa32ea6f30a32e7892af42c44cfa5a (patch)
treeb71d8e00d94f510a80f9ada1fa16685e87d6086e /source/blender/editors/transform
parent3f788eacee5ad075680ac165a2b6a5dde1b49efe (diff)
Fix T57767: Pivot point broken after scaling to 0 in a dimension
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 brings back the "old" matrix inversion code (which has the benifit of providing a partial solution which makes the local transform center appear correct) Reviewers: campbellbarton Maniphest Tasks: T57767 Differential Revision: https://developer.blender.org/D4804
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_generics.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 2383d8e0a78..b2decab8d74 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1363,7 +1363,9 @@ void initTransDataContainers_FromObjectData(TransInfo *t,
BLI_assert((t->flag & T_2D_EDIT) == 0);
copy_m4_m4(tc->mat, objects[i]->obmat);
copy_m3_m4(tc->mat3, tc->mat);
- invert_m4_m4(tc->imat, tc->mat);
+ /* for non-invertible scale matrices, invert_m4_m4_fallback()
+ * can still provide a valid pivot */
+ invert_m4_m4_fallback(tc->imat, tc->mat);
invert_m3_m3(tc->imat3, tc->mat3);
normalize_m3_m3(tc->mat3_unit, tc->mat3);
}