diff options
Diffstat (limited to 'rigify/rigs')
-rw-r--r-- | rigify/rigs/faces/super_face.py | 24 | ||||
-rw-r--r-- | rigify/rigs/limbs/arm.py | 16 | ||||
-rw-r--r-- | rigify/rigs/limbs/leg.py | 12 | ||||
-rw-r--r-- | rigify/rigs/limbs/paw.py | 16 | ||||
-rw-r--r-- | rigify/rigs/limbs/rear_paw.py | 16 |
5 files changed, 22 insertions, 62 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 diff --git a/rigify/rigs/limbs/arm.py b/rigify/rigs/limbs/arm.py index e7e08c41..b5c07569 100644 --- a/rigify/rigs/limbs/arm.py +++ b/rigify/rigs/limbs/arm.py @@ -1140,22 +1140,6 @@ def create_sample(obj): bones = {} - for _ in range(29): - arm.rigify_layers.add() - - arm.rigify_layers[5].name = 'Fingers' - arm.rigify_layers[5].row = 5 - arm.rigify_layers[6].name = 'Fingers (Tweak)' - arm.rigify_layers[6].row = 6 - arm.rigify_layers[7].name = 'Arm.L (IK)' - arm.rigify_layers[7].row = 7 - arm.rigify_layers[8].name = 'Arm.L (FK)' - arm.rigify_layers[8].row = 8 - arm.rigify_layers[9].name = 'Arm.L (Tweak)' - arm.rigify_layers[9].row = 9 - arm.rigify_layers[28].name = "Root" - arm.rigify_layers[28].row = 14 - bone = arm.edit_bones.new('upper_arm.L') bone.head[:] = 0.1953, 0.0267, 1.5846 bone.tail[:] = 0.4424, 0.0885, 1.4491 diff --git a/rigify/rigs/limbs/leg.py b/rigify/rigs/limbs/leg.py index c1cd1f06..021f641b 100644 --- a/rigify/rigs/limbs/leg.py +++ b/rigify/rigs/limbs/leg.py @@ -1449,18 +1449,6 @@ def create_sample(obj): bones = {} - for _ in range(29): - arm.rigify_layers.add() - - arm.rigify_layers[13].name = 'Leg.L (IK)' - arm.rigify_layers[13].row = 10 - arm.rigify_layers[14].name = 'Leg.L (FK)' - arm.rigify_layers[14].row = 11 - arm.rigify_layers[15].name = 'Leg.L (Tweak)' - arm.rigify_layers[15].row = 12 - arm.rigify_layers[28].name = "Root" - arm.rigify_layers[28].row = 14 - bone = arm.edit_bones.new('thigh.L') bone.head[:] = 0.0980, 0.0124, 1.0720 bone.tail[:] = 0.0980, -0.0286, 0.5372 diff --git a/rigify/rigs/limbs/paw.py b/rigify/rigs/limbs/paw.py index 720dea1c..8c9dab20 100644 --- a/rigify/rigs/limbs/paw.py +++ b/rigify/rigs/limbs/paw.py @@ -1277,22 +1277,6 @@ def create_sample(obj): bones = {} - for _ in range(29): - arm.rigify_layers.add() - - arm.rigify_layers[5].name = 'Paws' - arm.rigify_layers[5].row = 5 - arm.rigify_layers[6].name = 'Paws (Tweak)' - arm.rigify_layers[6].row = 6 - arm.rigify_layers[7].name = 'Arm.L (IK)' - arm.rigify_layers[7].row = 7 - arm.rigify_layers[8].name = 'Arm.L (FK)' - arm.rigify_layers[8].row = 8 - arm.rigify_layers[9].name = 'Arm.L (Tweak)' - arm.rigify_layers[9].row = 9 - arm.rigify_layers[28].name = "Root" - arm.rigify_layers[28].row = 14 - bone = arm.edit_bones.new('upper_arm.L') bone.head[:] = 0.0313, -0.1149, 0.2257 bone.tail[:] = 0.0313, -0.0878, 0.1235 diff --git a/rigify/rigs/limbs/rear_paw.py b/rigify/rigs/limbs/rear_paw.py index 015ede83..74974bb6 100644 --- a/rigify/rigs/limbs/rear_paw.py +++ b/rigify/rigs/limbs/rear_paw.py @@ -21,22 +21,6 @@ def create_sample(obj): bones = {} - for _ in range(29): - arm.rigify_layers.add() - - arm.rigify_layers[5].name = 'Paws' - arm.rigify_layers[5].row = 5 - arm.rigify_layers[6].name = 'Paws (Tweak)' - arm.rigify_layers[6].row = 6 - arm.rigify_layers[13].name = 'Leg.L (IK)' - arm.rigify_layers[13].row = 7 - arm.rigify_layers[14].name = 'Leg.L (FK)' - arm.rigify_layers[14].row = 8 - arm.rigify_layers[15].name = 'Leg.L (Tweak)' - arm.rigify_layers[15].row = 9 - arm.rigify_layers[28].name = "Root" - arm.rigify_layers[28].row = 14 - bone = arm.edit_bones.new('thigh.L') bone.head[:] = 0.0291, 0.1181, 0.2460 bone.tail[:] = 0.0293, 0.1107, 0.1682 |