Blender Git Commit Log

Git Commits -> Revision 0342fb5

Revision 0342fb5 by Sybren A. Stüvel (master)
August 3, 2021, 11:43 (GMT)
Fix T90387: division by zero when trying to invert scale

Fix division by zero when `BKE_bone_parent_transform_invert()` inverts a
scale vector with zero components.

Zero values in the to-be-inverted vector are now simply skipped, i.e.
remain zero after inversion. This at least ensures that
`invert_v3_safe(invert_v3_safe(vector))` results in the same vector.

This commit does NOT fix the conceptual problem that an inversion of a
potentially non-invertible vector is relied upon. It just avoids the
division by zero.

Commit Details:

Full Hash: 0342fb5d20cd13b495a7511ccfdfc3044d83cb04
Parent Commit: dbd34a5
Lines Changed: +33, -1

4 Modified Paths:

/source/blender/blenkernel/intern/armature.c (+1, -1) (Diff)
/source/blender/blenlib/BLI_math_vector.h (+1, -0) (Diff)
/source/blender/blenlib/intern/math_vector_inline.c (+13, -0) (Diff)
/source/blender/blenlib/tests/ (+18, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021