diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-10-01 09:59:51 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-10-01 14:29:30 +0300 |
commit | 50c493fb22869e0e08936c4b7a44624887b1de58 (patch) | |
tree | 59c571688b6e09f9d41cf6053924f7a3dfdb377d /rigify/rigs/spines/super_head.py | |
parent | e57714f3a2805b5ca71d68f967961950e707e191 (diff) |
Rigify: add more parent switching and 2.81 inherit scale features.
- Add a parent switch to the main spine control, to allow using the
key baking operator to convert between moving and fixed root bone.
- Add hips, chest and head as parents for children of the spine.
- Use 'Fix Shear' Inherit Scale and 'Make Uniform' Copy Scale in limbs.
- Switch code to use the new inherit_scale parameter of set_bone_parent.
- Allow local matrices in adjust_widget_transform_mesh.
Diffstat (limited to 'rigify/rigs/spines/super_head.py')
-rw-r--r-- | rigify/rigs/spines/super_head.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rigify/rigs/spines/super_head.py b/rigify/rigs/spines/super_head.py index 422f3ad0..9b85e5b5 100644 --- a/rigify/rigs/spines/super_head.py +++ b/rigify/rigs/spines/super_head.py @@ -26,6 +26,7 @@ from ...utils.naming import make_derived_name from ...utils.bones import align_bone_orientation from ...utils.widgets_basic import create_circle_widget, create_cube_widget from ...utils.widgets_special import create_neck_bend_widget, create_neck_tweak_widget +from ...utils.switch_parent import SwitchParentBuilder from ...utils.misc import map_list from ...base_rig import stage @@ -253,8 +254,7 @@ class Rig(BaseHeadTailRig): def parent_mch_chain(self): mch = self.bones.mch for bone in mch.chain: - self.set_bone_parent(bone, mch.stretch) - self.get_bone(bone).inherit_scale = 'NONE' + self.set_bone_parent(bone, mch.stretch, inherit_scale='NONE') @stage.rig_bones def rig_mch_chain(self): @@ -318,6 +318,12 @@ class Rig(BaseHeadTailRig): #################################################### # ORG and DEF bones + @stage.generate_bones + def register_parent_bones(self): + rig = self.rigify_parent or self + builder = SwitchParentBuilder(self.generator) + builder.register_parent(rig, self.bones.org[-1], name='Head', exclude_self=True) + @stage.configure_bones def configure_bbone_chain(self): self.get_bone(self.bones.deform[-1]).bone.bbone_segments = 1 |