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>2019-10-15 19:21:25 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-10-16 13:41:48 +0300
commit358bc43ef460e97239bccc379086f98ef6d95472 (patch)
tree6456ee46d145dd7f8a7269eabeff61dfd686e81f /rigify/rigs/limbs/leg.py
parent465f3e3f581f7dc25b299a15c5be6cdc58bbe053 (diff)
Rigify: implement optional custom pivot controls.
- Add an optional custom pivot between torso and the rest of the spine. - Add a custom pivot rig that can be used as a parent of the spine. - Add an optional custom pivot under limb IK controls.
Diffstat (limited to 'rigify/rigs/limbs/leg.py')
-rw-r--r--rigify/rigs/limbs/leg.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/rigify/rigs/limbs/leg.py b/rigify/rigs/limbs/leg.py
index dbdd20cb..900af982 100644
--- a/rigify/rigs/limbs/leg.py
+++ b/rigify/rigs/limbs/leg.py
@@ -121,6 +121,14 @@ class Rig(BaseLimbRig):
return name
+ def build_ik_pivot(self, ik_name, **args):
+ heel_bone = self.get_bone(self.bones.org.heel)
+ args = {
+ 'position': (heel_bone.head + heel_bone.tail)/2,
+ **args
+ }
+ return super().build_ik_pivot(ik_name, **args)
+
def register_switch_parents(self, pbuilder):
super().register_switch_parents(pbuilder)
@@ -143,7 +151,7 @@ class Rig(BaseLimbRig):
@stage.parent_bones
def parent_heel_control_bone(self):
- self.set_bone_parent(self.bones.ctrl.heel, self.bones.ctrl.ik)
+ self.set_bone_parent(self.bones.ctrl.heel, self.get_ik_control_output())
@stage.configure_bones
def configure_heel_control_bone(self):
@@ -200,7 +208,7 @@ class Rig(BaseLimbRig):
@stage.parent_bones
def parent_roll_mch_chain(self):
chain = self.bones.mch.heel
- self.set_bone_parent(chain[0], self.bones.ctrl.ik)
+ self.set_bone_parent(chain[0], self.get_ik_control_output())
self.parent_bone_chain(chain)
@stage.rig_bones