diff --git a/release/scripts/modules/rigify/arm_biped_generic.py b/release/scripts/modules/rigify/arm_biped_generic.py index dc45ccf8ae8..2363b5366e6 100644 --- a/release/scripts/modules/rigify/arm_biped_generic.py +++ b/release/scripts/modules/rigify/arm_biped_generic.py @@ -34,25 +34,25 @@ def metarig_template(): obj = bpy.context.active_object arm = obj.data bone = arm.edit_bones.new('shoulder') - bone.head[:] = 0.0000, -0.4515, 0.0000 - bone.tail[:] = 1.0000, -0.0794, 0.3540 + bone.head[:] = 0.0000, -0.0425, 0.0000 + bone.tail[:] = 0.0942, -0.0075, 0.0333 bone.roll = -0.2227 bone.connected = False bone = arm.edit_bones.new('upper_arm') - bone.head[:] = 1.1319, -0.0808, -0.0101 - bone.tail[:] = 3.0319, 0.2191, -0.1101 + bone.head[:] = 0.1066, -0.0076, -0.0010 + bone.tail[:] = 0.2855, 0.0206, -0.0104 bone.roll = 1.6152 bone.connected = False bone.parent = arm.edit_bones['shoulder'] bone = arm.edit_bones.new('forearm') - bone.head[:] = 3.0319, 0.2191, -0.1101 - bone.tail[:] = 4.8319, -0.0809, -0.0242 + bone.head[:] = 0.2855, 0.0206, -0.0104 + bone.tail[:] = 0.4550, -0.0076, -0.0023 bone.roll = 1.5153 bone.connected = True bone.parent = arm.edit_bones['upper_arm'] bone = arm.edit_bones.new('hand') - bone.head[:] = 4.8319, -0.0809, -0.0242 - bone.tail[:] = 5.7590, -0.1553, -0.1392 + bone.head[:] = 0.4550, -0.0076, -0.0023 + bone.tail[:] = 0.5423, -0.0146, -0.0131 bone.roll = -3.0083 bone.connected = True bone.parent = arm.edit_bones['forearm'] diff --git a/release/scripts/modules/rigify/finger_curl.py b/release/scripts/modules/rigify/finger_curl.py index cec6504a8aa..a4688ee8b5b 100644 --- a/release/scripts/modules/rigify/finger_curl.py +++ b/release/scripts/modules/rigify/finger_curl.py @@ -28,23 +28,24 @@ METARIG_NAMES = "finger_01", "finger_02", "finger_03" def metarig_template(): + # generated by rigify.write_meta_rig bpy.ops.object.mode_set(mode='EDIT') obj = bpy.context.active_object arm = obj.data bone = arm.edit_bones.new('finger.01') bone.head[:] = 0.0000, 0.0000, 0.0000 - bone.tail[:] = 0.8788, -0.4584, -0.1327 + bone.tail[:] = 0.0353, -0.0184, -0.0053 bone.roll = -2.8722 bone.connected = False bone = arm.edit_bones.new('finger.02') - bone.head[:] = 0.8788, -0.4584, -0.1327 - bone.tail[:] = 1.7483, -0.9059, -0.3643 + bone.head[:] = 0.0353, -0.0184, -0.0053 + bone.tail[:] = 0.0702, -0.0364, -0.0146 bone.roll = -2.7099 bone.connected = True bone.parent = arm.edit_bones['finger.01'] bone = arm.edit_bones.new('finger.03') - bone.head[:] = 1.7483, -0.9059, -0.3643 - bone.tail[:] = 2.2478, -1.1483, -0.7408 + bone.head[:] = 0.0702, -0.0364, -0.0146 + bone.tail[:] = 0.0903, -0.0461, -0.0298 bone.roll = -2.1709 bone.connected = True bone.parent = arm.edit_bones['finger.02'] diff --git a/release/scripts/modules/rigify/leg_biped_generic.py b/release/scripts/modules/rigify/leg_biped_generic.py index 2826a6b7b29..7cb71009596 100644 --- a/release/scripts/modules/rigify/leg_biped_generic.py +++ b/release/scripts/modules/rigify/leg_biped_generic.py @@ -33,36 +33,36 @@ def metarig_template(): arm = obj.data bone = arm.edit_bones.new('hips') bone.head[:] = 0.0000, 0.0000, 0.0000 - bone.tail[:] = 0.0000, 0.0000, 1.0000 + bone.tail[:] = 0.0000, 0.0000, 0.2506 bone.roll = 0.0000 bone.connected = False bone = arm.edit_bones.new('thigh') - bone.head[:] = 0.5000, 0.0000, 0.0000 - bone.tail[:] = 0.3000, -0.1000, -1.7000 + bone.head[:] = 0.1253, 0.0000, -0.0000 + bone.tail[:] = 0.0752, -0.0251, -0.4260 bone.roll = 0.1171 bone.connected = False bone.parent = arm.edit_bones['hips'] bone = arm.edit_bones.new('shin') - bone.head[:] = 0.3000, -0.1000, -1.7000 - bone.tail[:] = 0.3000, 0.0000, -3.5000 - bone.roll = -0.0000 + bone.head[:] = 0.0752, -0.0251, -0.4260 + bone.tail[:] = 0.0752, 0.0000, -0.8771 + bone.roll = 0.0000 bone.connected = True bone.parent = arm.edit_bones['thigh'] bone = arm.edit_bones.new('foot') - bone.head[:] = 0.3000, 0.0000, -3.5000 - bone.tail[:] = 0.4042, -0.5909, -3.9000 + bone.head[:] = 0.0752, 0.0000, -0.8771 + bone.tail[:] = 0.1013, -0.1481, -0.9773 bone.roll = -0.4662 bone.connected = True bone.parent = arm.edit_bones['shin'] bone = arm.edit_bones.new('toe') - bone.head[:] = 0.4042, -0.5909, -3.9000 - bone.tail[:] = 0.4391, -0.9894, -3.9000 - bone.roll = -3.1416 + bone.head[:] = 0.1013, -0.1481, -0.9773 + bone.tail[:] = 0.1100, -0.2479, -0.9773 + bone.roll = 3.1416 bone.connected = True bone.parent = arm.edit_bones['foot'] bone = arm.edit_bones.new('heel') - bone.head[:] = 0.2600, 0.2000, -4.0000 - bone.tail[:] = 0.3700, -0.4000, -4.0000 + bone.head[:] = 0.0652, 0.0501, -1.0024 + bone.tail[:] = 0.0927, -0.1002, -1.0024 bone.roll = 0.0000 bone.connected = False bone.parent = arm.edit_bones['foot'] diff --git a/release/scripts/modules/rigify/leg_quadruped_generic.py b/release/scripts/modules/rigify/leg_quadruped_generic.py index d197b801142..3f7275e48c0 100644 --- a/release/scripts/modules/rigify/leg_quadruped_generic.py +++ b/release/scripts/modules/rigify/leg_quadruped_generic.py @@ -33,32 +33,32 @@ def metarig_template(): obj = bpy.context.active_object arm = obj.data bone = arm.edit_bones.new('body') - bone.head[:] = -0.3000, -1.0000, 0.0000 - bone.tail[:] = -0.3000, -1.0000, 1.0000 + bone.head[:] = -0.0728, -0.2427, 0.0000 + bone.tail[:] = -0.0728, -0.2427, 0.2427 bone.roll = 0.0000 bone.connected = False bone = arm.edit_bones.new('thigh') bone.head[:] = 0.0000, 0.0000, -0.0000 - bone.tail[:] = 0.3351, -0.8690, -1.3903 + bone.tail[:] = 0.0813, -0.2109, -0.3374 bone.roll = -0.4656 bone.connected = False bone.parent = arm.edit_bones['body'] bone = arm.edit_bones.new('shin') - bone.head[:] = 0.3351, -0.8690, -1.3903 - bone.tail[:] = 0.2943, -0.0179, -2.4026 + bone.head[:] = 0.0813, -0.2109, -0.3374 + bone.tail[:] = 0.0714, -0.0043, -0.5830 bone.roll = -0.2024 bone.connected = True bone.parent = arm.edit_bones['thigh'] bone = arm.edit_bones.new('foot') - bone.head[:] = 0.2943, -0.0179, -2.4026 - bone.tail[:] = 0.3830, -0.1995, -3.1531 + bone.head[:] = 0.0714, -0.0043, -0.5830 + bone.tail[:] = 0.0929, -0.0484, -0.7652 bone.roll = -0.3766 bone.connected = True bone.parent = arm.edit_bones['shin'] bone = arm.edit_bones.new('toe') - bone.head[:] = 0.3830, -0.1995, -3.1531 - bone.tail[:] = 0.4724, -0.5126, -3.1531 - bone.roll = 0.0000 + bone.head[:] = 0.0929, -0.0484, -0.7652 + bone.tail[:] = 0.1146, -0.1244, -0.7652 + bone.roll = -0.0000 bone.connected = True bone.parent = arm.edit_bones['foot'] diff --git a/release/scripts/modules/rigify/neck_flex.py b/release/scripts/modules/rigify/neck_flex.py index be548249433..c52230ed30a 100644 --- a/release/scripts/modules/rigify/neck_flex.py +++ b/release/scripts/modules/rigify/neck_flex.py @@ -33,43 +33,43 @@ def metarig_template(): obj = bpy.context.active_object arm = obj.data bone = arm.edit_bones.new('body') - bone.head[:] = -0.0000, -0.2771, -1.3345 - bone.tail[:] = -0.0000, -0.1708, -0.1984 + bone.head[:] = 0.0000, -0.0276, -0.1328 + bone.tail[:] = 0.0000, -0.0170, -0.0197 bone.roll = 0.0000 bone.connected = False bone = arm.edit_bones.new('head') - bone.head[:] = -0.0000, -0.1708, -0.1984 - bone.tail[:] = 0.0000, 0.7292, 1.3604 + bone.head[:] = 0.0000, -0.0170, -0.0197 + bone.tail[:] = 0.0000, 0.0726, 0.1354 bone.roll = 0.0000 bone.connected = True bone.parent = arm.edit_bones['body'] bone = arm.edit_bones.new('neck.01') - bone.head[:] = 0.0000, -0.1708, -0.1984 - bone.tail[:] = -0.0000, -0.0994, 0.1470 - bone.roll = -0.0000 + bone.head[:] = 0.0000, -0.0170, -0.0197 + bone.tail[:] = 0.0000, -0.0099, 0.0146 + bone.roll = 0.0000 bone.connected = False bone.parent = arm.edit_bones['head'] bone = arm.edit_bones.new('neck.02') - bone.head[:] = -0.0000, -0.0994, 0.1470 - bone.tail[:] = 0.0000, -0.2428, 0.5162 - bone.roll = -0.0000 + bone.head[:] = 0.0000, -0.0099, 0.0146 + bone.tail[:] = 0.0000, -0.0242, 0.0514 + bone.roll = 0.0000 bone.connected = True bone.parent = arm.edit_bones['neck.01'] bone = arm.edit_bones.new('neck.03') - bone.head[:] = 0.0000, -0.2428, 0.5162 - bone.tail[:] = 0.0000, -0.4190, 0.8722 - bone.roll = -0.0000 + bone.head[:] = 0.0000, -0.0242, 0.0514 + bone.tail[:] = 0.0000, -0.0417, 0.0868 + bone.roll = 0.0000 bone.connected = True bone.parent = arm.edit_bones['neck.02'] bone = arm.edit_bones.new('neck.04') - bone.head[:] = 0.0000, -0.4190, 0.8722 - bone.tail[:] = 0.0000, -0.5111, 1.1956 + bone.head[:] = 0.0000, -0.0417, 0.0868 + bone.tail[:] = 0.0000, -0.0509, 0.1190 bone.roll = 0.0000 bone.connected = True bone.parent = arm.edit_bones['neck.03'] bone = arm.edit_bones.new('neck.05') - bone.head[:] = 0.0000, -0.5111, 1.1956 - bone.tail[:] = 0.0000, -0.5391, 1.6081 + bone.head[:] = 0.0000, -0.0509, 0.1190 + bone.tail[:] = 0.0000, -0.0537, 0.1600 bone.roll = 0.0000 bone.connected = True bone.parent = arm.edit_bones['neck.04'] diff --git a/release/scripts/modules/rigify/palm_curl.py b/release/scripts/modules/rigify/palm_curl.py index 8e0a80f98e8..f2ddcca6d59 100644 --- a/release/scripts/modules/rigify/palm_curl.py +++ b/release/scripts/modules/rigify/palm_curl.py @@ -33,43 +33,43 @@ def metarig_template(): obj = bpy.context.active_object arm = obj.data bone = arm.edit_bones.new('hand') - bone.head[:] = 0.0082, -1.2492, 0.0000 - bone.tail[:] = 0.0423, -0.4150, 0.0000 + bone.head[:] = 0.0004, -0.0629, 0.0000 + bone.tail[:] = 0.0021, -0.0209, 0.0000 bone.roll = 0.0000 bone.connected = False bone = arm.edit_bones.new('palm.03') - bone.head[:] = 0.0000, 0.0000, -0.0000 - bone.tail[:] = 0.0506, 1.2781, -0.1299 + bone.head[:] = -0.0000, 0.0000, 0.0000 + bone.tail[:] = 0.0025, 0.0644, -0.0065 bone.roll = -3.1396 bone.connected = False bone.parent = arm.edit_bones['hand'] bone = arm.edit_bones.new('palm.02') - bone.head[:] = 0.5000, -0.0000, 0.0000 - bone.tail[:] = 0.6433, 1.2444, -0.1299 + bone.head[:] = 0.0252, -0.0000, 0.0000 + bone.tail[:] = 0.0324, 0.0627, -0.0065 bone.roll = -3.1357 bone.connected = False bone.parent = arm.edit_bones['hand'] bone = arm.edit_bones.new('palm.01') - bone.head[:] = 1.0000, 0.0000, 0.0000 - bone.tail[:] = 1.3961, 1.0084, -0.1299 + bone.head[:] = 0.0504, 0.0000, 0.0000 + bone.tail[:] = 0.0703, 0.0508, -0.0065 bone.roll = -3.1190 bone.connected = False bone.parent = arm.edit_bones['hand'] bone = arm.edit_bones.new('palm.04') - bone.head[:] = -0.5000, 0.0000, -0.0000 - bone.tail[:] = -0.5674, 1.2022, -0.1299 + bone.head[:] = -0.0252, 0.0000, 0.0000 + bone.tail[:] = -0.0286, 0.0606, -0.0065 bone.roll = 3.1386 bone.connected = False bone.parent = arm.edit_bones['hand'] bone = arm.edit_bones.new('palm.05') - bone.head[:] = -1.0000, 0.0000, -0.0000 - bone.tail[:] = -1.3286, 1.0590, -0.1299 + bone.head[:] = -0.0504, 0.0000, 0.0000 + bone.tail[:] = -0.0669, 0.0534, -0.0065 bone.roll = 3.1239 bone.connected = False bone.parent = arm.edit_bones['hand'] bone = arm.edit_bones.new('thumb') - bone.head[:] = 1.3536, -0.2941, 0.0000 - bone.tail[:] = 2.1109, 0.4807, -0.1299 + bone.head[:] = 0.0682, -0.0148, 0.0000 + bone.tail[:] = 0.1063, 0.0242, -0.0065 bone.roll = -3.0929 bone.connected = False bone.parent = arm.edit_bones['hand'] diff --git a/release/scripts/modules/rigify/spine_pivot_flex.py b/release/scripts/modules/rigify/spine_pivot_flex.py index 8ae715b14ee..7f74028ddfb 100644 --- a/release/scripts/modules/rigify/spine_pivot_flex.py +++ b/release/scripts/modules/rigify/spine_pivot_flex.py @@ -33,55 +33,55 @@ def metarig_template(): obj = bpy.context.active_object arm = obj.data bone = arm.edit_bones.new('pelvis') - bone.head[:] = -0.0000, -0.2559, 0.8673 - bone.tail[:] = -0.0000, -0.2559, -0.1327 + bone.head[:] = 0.0000, -0.0306, 0.1039 + bone.tail[:] = 0.0000, -0.0306, -0.0159 bone.roll = 0.0000 bone.connected = False bone = arm.edit_bones.new('rib_cage') - bone.head[:] = -0.0000, -0.2559, 0.8673 - bone.tail[:] = -0.0000, -0.2559, 1.8673 + bone.head[:] = 0.0000, -0.0306, 0.1039 + bone.tail[:] = 0.0000, -0.0306, 0.2236 bone.roll = -0.0000 bone.connected = False bone.parent = arm.edit_bones['pelvis'] bone = arm.edit_bones.new('spine.01') - bone.head[:] = -0.0000, -0.0000, 0.0000 - bone.tail[:] = -0.0000, -0.2559, 0.8673 + bone.head[:] = 0.0000, 0.0000, -0.0000 + bone.tail[:] = 0.0000, -0.0306, 0.1039 bone.roll = -0.0000 bone.connected = False bone.parent = arm.edit_bones['rib_cage'] bone = arm.edit_bones.new('spine.02') - bone.head[:] = -0.0000, -0.2559, 0.8673 - bone.tail[:] = -0.0000, -0.3321, 1.7080 + bone.head[:] = 0.0000, -0.0306, 0.1039 + bone.tail[:] = -0.0000, -0.0398, 0.2045 bone.roll = -0.0000 bone.connected = True bone.parent = arm.edit_bones['spine.01'] bone = arm.edit_bones.new('spine.03') - bone.head[:] = -0.0000, -0.3321, 1.7080 - bone.tail[:] = -0.0000, -0.0787, 2.4160 - bone.roll = 0.0000 + bone.head[:] = -0.0000, -0.0398, 0.2045 + bone.tail[:] = -0.0000, -0.0094, 0.2893 + bone.roll = -0.0000 bone.connected = True bone.parent = arm.edit_bones['spine.02'] bone = arm.edit_bones.new('spine.04') - bone.head[:] = -0.0000, -0.0787, 2.4160 - bone.tail[:] = -0.0000, 0.2797, 3.0016 - bone.roll = 0.0000 + bone.head[:] = -0.0000, -0.0094, 0.2893 + bone.tail[:] = -0.0000, 0.0335, 0.3595 + bone.roll = -0.0000 bone.connected = True bone.parent = arm.edit_bones['spine.03'] bone = arm.edit_bones.new('spine.05') - bone.head[:] = -0.0000, 0.2797, 3.0016 - bone.tail[:] = -0.0000, 0.4633, 3.6135 - bone.roll = 0.0000 + bone.head[:] = -0.0000, 0.0335, 0.3595 + bone.tail[:] = -0.0000, 0.0555, 0.4327 + bone.roll = -0.0000 bone.connected = True bone.parent = arm.edit_bones['spine.04'] bone = arm.edit_bones.new('spine.06') - bone.head[:] = -0.0000, 0.4633, 3.6135 - bone.tail[:] = -0.0000, 0.3671, 4.3477 + bone.head[:] = -0.0000, 0.0555, 0.4327 + bone.tail[:] = -0.0000, 0.0440, 0.5207 bone.roll = -0.0000 bone.connected = True bone.parent = arm.edit_bones['spine.05'] bone = arm.edit_bones.new('spine.07') - bone.head[:] = -0.0000, 0.3671, 4.3477 - bone.tail[:] = -0.0000, 0.0175, 5.0033 + bone.head[:] = -0.0000, 0.0440, 0.5207 + bone.tail[:] = -0.0000, 0.0021, 0.5992 bone.roll = -0.0000 bone.connected = True bone.parent = arm.edit_bones['spine.06'] @@ -90,7 +90,6 @@ def metarig_template(): pbone = obj.pose.bones['rib_cage'] pbone['type'] = 'spine_pivot_flex' - def metarig_definition(obj, orig_bone_name): ''' The bone given is the second in a chain. diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index 99561a026e3..3369adab5a8 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -232,14 +232,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel): bl_default_closed = True def poll(self, context): - ob = context.object - bone = context.bone - pchan = ob.pose.bones[bone.name] - - if ob and bone and pchan: - return True - - return False + return context.active_pose_bone def draw(self, context): layout = self.layout