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:
authorCampbell Barton <ideasman42@gmail.com>2021-01-16 03:29:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-16 03:32:00 +0300
commitc4bbe44e472b97911127ce354954ff7e9e290a3d (patch)
tree943218e8bc3326e258bc7120af28d24ceb12fe33 /source/blender/editors/space_view3d
parent2f0d919f89cbed64965fa7c39d92419b0ef5bd9e (diff)
Add Object Tool: workaround non-orthogonal orientation matrices
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_placement.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index 638c61fc331..5bd1b3458e2 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -795,6 +795,12 @@ static void view3d_interactive_add_calc_plane(bContext *C,
const RegionView3D *rv3d = region->regiondata;
ED_transform_calc_orientation_from_type(C, r_matrix_orient);
+ /* Non-orthogonal matrices cause the preview and final result not to match.
+ *
+ * While making orthogonal doesn't always work well (especially with gimbal orientation for e.g.)
+ * it's a corner case, without better alternatives as objects don't support shear. */
+ orthogonalize_m3(r_matrix_orient, plane_axis);
+
SnapObjectContext *snap_context = NULL;
bool snap_context_free = false;