diff options
Diffstat (limited to 'rigify/rigs/faces/super_face.py')
-rw-r--r-- | rigify/rigs/faces/super_face.py | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/rigify/rigs/faces/super_face.py b/rigify/rigs/faces/super_face.py index ae12ecf6..129ddb87 100644 --- a/rigify/rigs/faces/super_face.py +++ b/rigify/rigs/faces/super_face.py @@ -57,6 +57,15 @@ class Rig: else: self.secondary_layers = None + def orient_org_bones(self): + + bpy.ops.object.mode_set(mode='EDIT') + eb = self.obj.data.edit_bones + + # Adjust eye bones roll + eb['ORG-eye.L'].roll = 0.0 + eb['ORG-eye.R'].roll = 0.0 + def symmetrical_split(self, bones): # RE pattern match right or left parts @@ -254,6 +263,16 @@ class Rig: eb[ tweak_name ].use_connect = False eb[ tweak_name ].parent = None + if bone in uniques: + if bone.split('.')[-1] == 'L': + simmetrical_bone = bone[:-1] + 'R' + elif bone.split('.')[-1] == 'R': + simmetrical_bone = bone[:-1] + 'L' + middle_position = (eb[bone].head + eb[simmetrical_bone].head)/2 + eb[tweak_name].head = middle_position + eb[tweak_name].tail[0] = middle_position[0] + eb[tweak_name].tail[1] = middle_position[1] + tweaks.append( tweak_name ) eb[ tweak_name ].tail[:] = \ @@ -979,7 +998,8 @@ class Rig: }, tweak_unique def generate(self): - + + self.orient_org_bones() all_bones, tweak_unique = self.create_bones() self.parent_bones(all_bones, tweak_unique) self.constraints(all_bones) @@ -1184,7 +1204,7 @@ def create_sample(obj): bone = arm.edit_bones.new('eye.R') bone.head[:] = -0.0360, -0.0686, 0.1107 bone.tail[:] = -0.0360, -0.0848, 0.1107 - bone.roll = -0.0000 + bone.roll = 0.0000 bone.use_connect = False bone.parent = arm.edit_bones[bones['face']] bones['eye.R'] = bone.name |