diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-25 07:32:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-25 07:32:10 +0300 |
commit | 5eb7aa5ebba9cf6a88e0433ac679ad8f810c5c47 (patch) | |
tree | 393081ffac23842dbdc21d8500c9bfdfd4cb2adb /source/blender/editors/mesh/meshtools.c | |
parent | 96401e2ef86809759d30cbc1d1b8ba0b666f5f4c (diff) |
Fix T80077: Objects disappear when joining with a zero scaled axis
Use invert_m4_m4_safe_ortho when joining objects so zero scaled axis
doesn't cause all points to be scaled to zero.
Instead geometry is left un-scaled on degenerate axes.
Report a warning in this case since users may want to adjust the
active objects scale.
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index e89d2726c06..bd14919d1d7 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -590,8 +590,9 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op) loopofs = 0; polyofs = 0; - /* inverse transform for all selected meshes in this object */ - invert_m4_m4(imat, ob->obmat); + /* Inverse transform for all selected meshes in this object, + * See #object_join_exec for detailed comment on why the safe version is used. */ + invert_m4_m4_safe_ortho(imat, ob->obmat); /* Add back active mesh first. * This allows to keep things similar as they were, as much as possible |