Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-11-17 14:44:04 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-11-17 14:44:04 +0300
commit26088d766e55bd4b18be812d60aa20f5316f8ab8 (patch)
tree2cfced4e0392e3fbbdd5a78fefe59a3f244ec45a /rigify/rigs/limbs/limb_rigs.py
parent1bab44a79366a65f31b5047399744ea3b43871fc (diff)
Rigify: replace the Damped Track + Stretch To idiom with the Swing mode.
It has been long enough since 2.82 when Swing was added to use this.
Diffstat (limited to 'rigify/rigs/limbs/limb_rigs.py')
-rw-r--r--rigify/rigs/limbs/limb_rigs.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/rigify/rigs/limbs/limb_rigs.py b/rigify/rigs/limbs/limb_rigs.py
index bb7de5f1..2e3fbc90 100644
--- a/rigify/rigs/limbs/limb_rigs.py
+++ b/rigify/rigs/limbs/limb_rigs.py
@@ -565,8 +565,7 @@ class BaseLimbRig(BaseRig):
self.rig_ik_mch_end_bone(mch.ik_end, mch.ik_target, self.bones.ctrl.ik_pole)
def rig_ik_mch_stretch_bone(self, mch_stretch, input_bone):
- self.make_constraint(mch_stretch, 'DAMPED_TRACK', input_bone, head_tail=self.ik_input_head_tail)
- self.make_constraint(mch_stretch, 'STRETCH_TO', input_bone, head_tail=self.ik_input_head_tail)
+ self.make_constraint(mch_stretch, 'STRETCH_TO', input_bone, head_tail=self.ik_input_head_tail, keep_axis='SWING_Y')
con = self.make_constraint(mch_stretch, 'LIMIT_SCALE', min_y=0.0, max_y=1.05, owner_space='LOCAL')
@@ -765,14 +764,12 @@ class BaseLimbRig(BaseRig):
self.make_constraint(deform, 'COPY_TRANSFORMS', tweak)
if next_tweak:
- self.make_constraint(deform, 'DAMPED_TRACK', next_tweak)
- self.make_constraint(deform, 'STRETCH_TO', next_tweak)
+ self.make_constraint(deform, 'STRETCH_TO', next_tweak, keep_axis='SWING_Y')
self.rig_deform_easing(i, deform, tweak, next_tweak)
elif next_entry:
- self.make_constraint(deform, 'DAMPED_TRACK', next_entry.org)
- self.make_constraint(deform, 'STRETCH_TO', next_entry.org)
+ self.make_constraint(deform, 'STRETCH_TO', next_entry.org, keep_axis='SWING_Y')
else:
self.make_constraint(deform, 'COPY_TRANSFORMS', entry.org)