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/limbs/limb_rigs.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/limbs/limb_rigs.py')
-rw-r--r-- | rigify/rigs/limbs/limb_rigs.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rigify/rigs/limbs/limb_rigs.py b/rigify/rigs/limbs/limb_rigs.py index 30d475bb..81079c05 100644 --- a/rigify/rigs/limbs/limb_rigs.py +++ b/rigify/rigs/limbs/limb_rigs.py @@ -218,7 +218,7 @@ class BaseLimbRig(BaseRig): def parent_mch_follow_bone(self): mch = self.bones.mch.follow align_bone_orientation(self.obj, mch, 'root') - self.set_bone_parent(mch, self.rig_parent_bone) + self.set_bone_parent(mch, self.rig_parent_bone, inherit_scale='FIX_SHEAR') @stage.configure_bones def configure_mch_follow_bone(self): @@ -232,8 +232,9 @@ class BaseLimbRig(BaseRig): def rig_mch_follow_bone(self): mch = self.bones.mch.follow + self.make_constraint(mch, 'COPY_SCALE', 'root', use_make_uniform=True) + con = self.make_constraint(mch, 'COPY_ROTATION', 'root') - self.make_constraint(mch, 'COPY_SCALE', 'root') self.make_driver(con, 'influence', variables=[(self.prop_bone, 'FK_limb_follow')]) @@ -311,7 +312,7 @@ class BaseLimbRig(BaseRig): def parent_fk_parent_bone(self, i, parent_mch, prev_ctrl, org, prev_org): if i == 2: - self.set_bone_parent(parent_mch, prev_ctrl, use_connect=True) + self.set_bone_parent(parent_mch, prev_ctrl, use_connect=True, inherit_scale='NONE') @stage.rig_bones def rig_fk_parent_chain(self): @@ -320,7 +321,7 @@ class BaseLimbRig(BaseRig): def rig_fk_parent_bone(self, i, parent_mch, org): if i == 2: - self.make_constraint(parent_mch, 'COPY_SCALE', 'root') + self.make_constraint(parent_mch, 'COPY_SCALE', 'root', use_make_uniform=True) #################################################### @@ -691,7 +692,7 @@ class BaseLimbRig(BaseRig): self.make_constraint(tweak, 'DAMPED_TRACK', next_tweak) elif entry.seg_idx is not None: - self.make_constraint(tweak, 'COPY_SCALE', 'root') + self.make_constraint(tweak, 'COPY_SCALE', 'root', use_make_uniform=True) #################################################### |