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>2020-08-25 07:32:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-25 07:32:10 +0300
commit5eb7aa5ebba9cf6a88e0433ac679ad8f810c5c47 (patch)
tree393081ffac23842dbdc21d8500c9bfdfd4cb2adb /source/blender/editors/armature
parent96401e2ef86809759d30cbc1d1b8ba0b666f5f4c (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/armature')
-rw-r--r--source/blender/editors/armature/armature_relations.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index caf9cc3b2a3..2efb7315b89 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -304,6 +304,10 @@ int ED_armature_join_objects_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ /* Inverse transform for all selected armatures in this object,
+ * See #object_join_exec for detailed comment on why the safe version is used. */
+ invert_m4_m4_safe_ortho(oimat, ob_active->obmat);
+
/* Get edit-bones of active armature to add edit-bones to */
ED_armature_to_edit(arm);
@@ -334,7 +338,6 @@ int ED_armature_join_objects_exec(bContext *C, wmOperator *op)
// BASACT->flag &= ~OB_MODE_POSE;
/* Find the difference matrix */
- invert_m4_m4(oimat, ob_active->obmat);
mul_m4_m4m4(mat, oimat, ob_iter->obmat);
/* Copy bones and posechannels from the object to the edit armature */