[Bf-extensions-cvs] [4efc7da9] blender-v3.2-release: Fix T96748: split IK toe control does not respect stretch limit.
Alexander Gavrilov
noreply at git.blender.org
Wed May 4 21:38:57 CEST 2022
Commit: 4efc7da9da28ea8c1c1c1c62e9d1f20336f5ec08
Author: Alexander Gavrilov
Date: Wed May 4 22:33:48 2022 +0300
Branches: blender-v3.2-release
https://developer.blender.org/rBA4efc7da9da28ea8c1c1c1c62e9d1f20336f5ec08
Fix T96748: split IK toe control does not respect stretch limit.
Split the parent mch bone and its rigging together with the control.
===================================================================
M rigify/rigs/limbs/leg.py
===================================================================
diff --git a/rigify/rigs/limbs/leg.py b/rigify/rigs/limbs/leg.py
index 05c606ef..77433101 100644
--- a/rigify/rigs/limbs/leg.py
+++ b/rigify/rigs/limbs/leg.py
@@ -98,9 +98,13 @@ class Rig(BaseLimbRig):
# Toe spin control.
# heel:
# Foot roll control
+ # ik_toe:
+ # If enabled, toe control for IK chain.
# mch:
# heel[]:
# Chain of bones implementing foot roll.
+ # ik_toe_parent:
+ # If using split IK toe, parent of the IK toe control.
#
####################################################
@@ -208,21 +212,35 @@ class Rig(BaseLimbRig):
@stage.generate_bones
def make_ik_toe_control(self):
if self.use_ik_toe:
- self.bones.ctrl.ik_toe = self.make_ik_toe_control_bone(self.bones.org.main[3])
+ toe = self.bones.org.main[3]
+ self.bones.ctrl.ik_toe = self.make_ik_toe_control_bone(toe)
+ self.bones.mch.ik_toe_parent = self.make_ik_toe_parent_mch_bone(toe)
def make_ik_toe_control_bone(self, org):
return self.copy_bone(org, make_derived_name(org, 'ctrl', '_ik'))
+ def make_ik_toe_parent_mch_bone(self, org):
+ return self.copy_bone(org, make_derived_name(org, 'mch', '_ik_parent'), scale=1/3)
+
@stage.parent_bones
def parent_ik_toe_control(self):
if self.use_ik_toe:
- self.set_bone_parent(self.bones.ctrl.ik_toe, self.get_mch_heel_toe_output())
+ mch = self.bones.mch
+ align_bone_orientation(self.obj, mch.ik_toe_parent, self.get_mch_heel_toe_output())
+
+ self.set_bone_parent(mch.ik_toe_parent, mch.ik_target, use_connect=True)
+ self.set_bone_parent(self.bones.ctrl.ik_toe, mch.ik_toe_parent)
@stage.configure_bones
def configure_ik_toe_control(self):
if self.use_ik_toe:
self.copy_bone_properties(self.bones.org.main[3], self.bones.ctrl.ik_toe, props=False)
+ @stage.rig_bones
+ def rig_ik_toe_control(self):
+ if self.use_ik_toe:
+ self.make_constraint(self.bones.mch.ik_toe_parent, 'COPY_TRANSFORMS', self.get_mch_heel_toe_output())
+
@stage.generate_widgets
def make_ik_toe_control_widget(self):
if self.use_ik_toe:
More information about the Bf-extensions-cvs
mailing list