Fix T96748: split IK toe control does not respect stretch limit.
Split the parent mch bone and its rigging together with the control.
This commit is contained in:
parent
015248ed8d
commit
4efc7da9da
Notes:
blender-bot
2023-02-14 18:22:41 +01:00
Referenced by issue #96748, Rigify toe always stretched in IK mode
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue