[Bf-blender-cvs] [8da23fd5aaa] master: Constraints: change default Stretch To rotation type to Swing.

Alexander Gavrilov noreply at git.blender.org
Mon Sep 27 19:45:18 CEST 2021


Commit: 8da23fd5aaa46354005b6caff83285cd61421c68
Author: Alexander Gavrilov
Date:   Sun Sep 26 12:50:25 2021 +0300
Branches: master
https://developer.blender.org/rB8da23fd5aaa46354005b6caff83285cd61421c68

Constraints: change default Stretch To rotation type to Swing.

As also explained in D6134, in most case of Stretch To usage in
rigs, it is desirable to use swing rotation, either via the old
method of pairing the constraint with Damped Track, or via the
Swing rotation type introduced in 2.82. This is for instance true
for all usages of the constraint in Rigify.

The reason can be understood by realizing that unlike order-
dependent euler rotations, swing is not biased to an axis, and
isn't affected by gimbal lock effects at merely 90 degrees
of rotation (it has only one singularity at 180 degrees).

Thus it makes sense to change the default for newly created
constraints to the Swing mode. This has no backward compatibility
concerns except for old tutorials and rig generation scripts.

Differential Revision: https://developer.blender.org/D12643

===================================================================

M	source/blender/blenkernel/intern/constraint.c

===================================================================

diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index b9b15eba6a4..b2b03d28483 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -3499,7 +3499,7 @@ static void stretchto_new_data(void *cdata)
   bStretchToConstraint *data = (bStretchToConstraint *)cdata;
 
   data->volmode = 0;
-  data->plane = 0;
+  data->plane = SWING_Y;
   data->orglength = 0.0;
   data->bulge = 1.0;
   data->bulge_max = 1.0f;



More information about the Bf-blender-cvs mailing list