diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-05-03 23:12:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-05-03 23:12:11 +0400 |
commit | 20fd05abc1e47ac51552c30a765e02ff529d2dc0 (patch) | |
tree | 9c84b2fb3a0a2820d5c350ef41b566ccae19fd17 /release | |
parent | 6cb02a167210a625eecca5d9964addf00e5f542a (diff) |
manually sync rigify with render branch
fixes [#22231] Rigify Script Error When Generate From Human(Meta-Rig)
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/rigify/arm_biped.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/rigify/eye_balls.py | 6 | ||||
-rw-r--r-- | release/scripts/modules/rigify/eye_lid.py | 37 | ||||
-rw-r--r-- | release/scripts/modules/rigify/finger_curl.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/rigify/leg_biped.py | 6 | ||||
-rw-r--r-- | release/scripts/modules/rigify/leg_quadruped.py | 12 | ||||
-rw-r--r-- | release/scripts/modules/rigify/mouth.py | 22 | ||||
-rw-r--r-- | release/scripts/modules/rigify/neck.py | 6 | ||||
-rw-r--r-- | release/scripts/modules/rigify/neck_flex.py | 8 | ||||
-rw-r--r-- | release/scripts/modules/rigify/palm_curl.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/rigify/shape_key_control.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/rigify/shape_key_distance.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/rigify/shape_key_rotdiff.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/rigify/spine_pivot_flex.py | 12 | ||||
-rw-r--r-- | release/scripts/modules/rigify/tail_control.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/rigify/tongue.py | 8 | ||||
-rw-r--r-- | release/scripts/modules/rigify_utils.py | 8 |
17 files changed, 72 insertions, 71 deletions
diff --git a/release/scripts/modules/rigify/arm_biped.py b/release/scripts/modules/rigify/arm_biped.py index b75b26b5f2f..7a99eb5d80a 100644 --- a/release/scripts/modules/rigify/arm_biped.py +++ b/release/scripts/modules/rigify/arm_biped.py @@ -192,7 +192,7 @@ def fk(obj, definitions, base_names, options): # shoulder is used as a hinge fk_chain.rename("shoulder", "MCH-%s_hinge" % base_names[mt.arm]) - fk_chain.shoulder_e.translate(Vector(0.0, fk_chain.shoulder_e.length / 2, 0.0)) + fk_chain.shoulder_e.translate(Vector((0.0, fk_chain.shoulder_e.length / 2, 0.0))) # upper arm constrains to this. ex.socket_e = copy_bone_simple(arm, mt.arm, "MCH-%s_socket" % base_names[mt.arm]) @@ -240,7 +240,7 @@ def fk(obj, definitions, base_names, options): con.name = "hinge" con.target = obj con.subtarget = mt.shoulder - driver_fcurve = con.driver_add("influence", 0) + driver_fcurve = con.driver_add("influence") driver = driver_fcurve.driver diff --git a/release/scripts/modules/rigify/eye_balls.py b/release/scripts/modules/rigify/eye_balls.py index 20bb08f39a8..48f0448dfb3 100644 --- a/release/scripts/modules/rigify/eye_balls.py +++ b/release/scripts/modules/rigify/eye_balls.py @@ -57,7 +57,7 @@ def addget_shape_key_driver(obj, name="Key"): if driver_s.data_path == driver_path: fcurve = driver_s if fcurve == None: - fcurve = obj.data.shape_keys.keys[name].driver_add("value", 0) + fcurve = obj.data.shape_keys.keys[name].driver_add("value") fcurve.driver.type = 'AVERAGE' new = True @@ -217,7 +217,7 @@ def control(obj, definitions, base_names, options): eyes += ["ORG-"+name] # Get the average position of the eyes - center = Vector(0,0,0) + center = Vector((0, 0, 0)) for eye in eyes: center += eb[eye].head if len(eyes) != 0: @@ -295,7 +295,7 @@ def control(obj, definitions, base_names, options): con.target = obj con.subtarget = head - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' mod = fcurve.modifiers[0] diff --git a/release/scripts/modules/rigify/eye_lid.py b/release/scripts/modules/rigify/eye_lid.py index 30492e4e138..bb9749011c2 100644 --- a/release/scripts/modules/rigify/eye_lid.py +++ b/release/scripts/modules/rigify/eye_lid.py @@ -299,14 +299,15 @@ def control(obj, definitions, base_names, options): lid8 = copy_bone_simple(obj.data, definitions[9], base_names[definitions[9]]).name size = eb[lid1].length - eb[lid1].tail = eb[lid1].head + Vector(0,size,0) - eb[lid2].tail = eb[lid2].head + Vector(0,size,0) - eb[lid3].tail = eb[lid3].head + Vector(0,size,0) - eb[lid4].tail = eb[lid4].head + Vector(0,size,0) - eb[lid5].tail = eb[lid5].head + Vector(0,size,0) - eb[lid6].tail = eb[lid6].head + Vector(0,size,0) - eb[lid7].tail = eb[lid7].head + Vector(0,size,0) - eb[lid8].tail = eb[lid8].head + Vector(0,size,0) + size_y = Vector(0.0, size, 0.0) + eb[lid1].tail = eb[lid1].head + size_y + eb[lid2].tail = eb[lid2].head + size_y + eb[lid3].tail = eb[lid3].head + size_y + eb[lid4].tail = eb[lid4].head + size_y + eb[lid5].tail = eb[lid5].head + size_y + eb[lid6].tail = eb[lid6].head + size_y + eb[lid7].tail = eb[lid7].head + size_y + eb[lid8].tail = eb[lid8].head + size_y eb[lid1].roll = 0 eb[lid2].roll = 0 @@ -438,7 +439,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -457,7 +458,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -475,7 +476,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -493,7 +494,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -511,7 +512,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance*2 con.maximum = distance con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -530,7 +531,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -548,7 +549,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -566,7 +567,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -584,7 +585,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -602,7 +603,7 @@ def control(obj, definitions, base_names, options): con.minimum = -distance con.maximum = distance*2 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() diff --git a/release/scripts/modules/rigify/finger_curl.py b/release/scripts/modules/rigify/finger_curl.py index 27ed437b5ac..63f1816012b 100644 --- a/release/scripts/modules/rigify/finger_curl.py +++ b/release/scripts/modules/rigify/finger_curl.py @@ -291,7 +291,7 @@ def main(obj, bone_definition, base_names, options): hinge_driver_path = pb[control].path_from_id() + '["hinge"]' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' diff --git a/release/scripts/modules/rigify/leg_biped.py b/release/scripts/modules/rigify/leg_biped.py index 2ea217847d7..53028986873 100644 --- a/release/scripts/modules/rigify/leg_biped.py +++ b/release/scripts/modules/rigify/leg_biped.py @@ -201,7 +201,7 @@ def ik(obj, bone_definition, base_names, options): ik.knee_target_e.local_location = False # roll the bone to point up... could also point in the same direction as ik.foot_roll - # ik.foot_roll_02_e.matrix * Vector(0.0, 0.0, 1.0) # ACK!, no rest matrix in editmode + # ik.foot_roll_02_e.matrix * Vector((0.0, 0.0, 1.0)) # ACK!, no rest matrix in editmode ik.foot_roll_01_e.align_roll((0.0, 0.0, -1.0)) bpy.ops.object.mode_set(mode='OBJECT') @@ -298,7 +298,7 @@ def fk(obj, bone_definition, base_names, options): ex.thigh_socket_e = copy_bone_simple(arm, mt_chain.thigh, "MCH-%s_socket" % base_names[mt_chain.thigh], parent=True) ex.thigh_socket = ex.thigh_socket_e.name - ex.thigh_socket_e.tail = ex.thigh_socket_e.head + Vector(0.0, 0.0, ex.thigh_socket_e.length / 4.0) + ex.thigh_socket_e.tail = ex.thigh_socket_e.head + Vector((0.0, 0.0, ex.thigh_socket_e.length / 4.0)) ex.thigh_hinge_e = copy_bone_simple(arm, mt.hips, "MCH-%s_hinge" % base_names[mt_chain.thigh], parent=False) ex.thigh_hinge = ex.thigh_hinge_e.name @@ -351,7 +351,7 @@ def fk(obj, bone_definition, base_names, options): # add driver hinge_driver_path = fk_chain.thigh_p.path_from_id() + '["hinge"]' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' diff --git a/release/scripts/modules/rigify/leg_quadruped.py b/release/scripts/modules/rigify/leg_quadruped.py index 3ee9065af61..688387bbd53 100644 --- a/release/scripts/modules/rigify/leg_quadruped.py +++ b/release/scripts/modules/rigify/leg_quadruped.py @@ -160,7 +160,7 @@ def ik(obj, bone_definition, base_names, options): ik.foot_roll_e.parent = ik_chain.foot_e ik.foot_roll_e.head -= mt_chain.toe_e.vector.normalize() * mt_chain.foot_e.length ik.foot_roll_e.tail = ik.foot_roll_e.head - (mt_chain.foot_e.vector.normalize() * mt_chain.toe_e.length) - ik.foot_roll_e.align_roll(mt_chain.foot_e.matrix.rotation_part() * Vector(0.0, 0.0, -1.0)) + ik.foot_roll_e.align_roll(mt_chain.foot_e.matrix.rotation_part() * Vector((0.0, 0.0, -1.0))) # MCH-foot ik.foot_roll_01_e = copy_bone_simple(arm, mt_chain.foot, "MCH-" + base_names[mt_chain.foot]) @@ -213,7 +213,7 @@ def ik(obj, bone_definition, base_names, options): con = mt_chain.thigh_p.constraints.new('COPY_TRANSFORMS') con.target = obj con.subtarget = ik_chain.thigh - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -225,7 +225,7 @@ def ik(obj, bone_definition, base_names, options): con = mt_chain.shin_p.constraints.new('COPY_TRANSFORMS') con.target = obj con.subtarget = ik_chain.shin - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -237,7 +237,7 @@ def ik(obj, bone_definition, base_names, options): con = mt_chain.foot_p.constraints.new('COPY_TRANSFORMS') con.target = obj con.subtarget = ik.foot_roll_02 - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -249,7 +249,7 @@ def ik(obj, bone_definition, base_names, options): con = mt_chain.toe_p.constraints.new('COPY_TRANSFORMS') con.target = obj con.subtarget = ik_chain.toe - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -371,7 +371,7 @@ def fk(obj, bone_definition, base_names, options): hinge_driver_path = pb[fk_chain.thigh].path_from_id() + '["hinge"]' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' diff --git a/release/scripts/modules/rigify/mouth.py b/release/scripts/modules/rigify/mouth.py index 9d36c60eede..d516a48ec95 100644 --- a/release/scripts/modules/rigify/mouth.py +++ b/release/scripts/modules/rigify/mouth.py @@ -77,7 +77,7 @@ def addget_shape_key_driver(obj, name="Key"): if driver_s.data_path == driver_path: fcurve = driver_s if fcurve == None: - fcurve = obj.data.shape_keys.keys[name].driver_add("value", 0) + fcurve = obj.data.shape_keys.keys[name].driver_add("value") fcurve.driver.type = 'AVERAGE' new = True @@ -173,7 +173,7 @@ def deform(obj, definitions, base_names, options): jopen1 = copy_bone_simple(obj.data, jaw, "MCH-"+base_names[jaw]+".track1", parent=True).name eb[jopen1].connected = False eb[jopen1].head = eb[jaw].tail - eb[jopen1].tail = eb[jopen1].head + Vector(0, 0, eb[jaw].length/4) + eb[jopen1].tail = eb[jopen1].head + Vector((0, 0, eb[jaw].length/4)) jopen2 = copy_bone_simple(obj.data, jopen1, "MCH-"+base_names[jaw]+".track2").name eb[jopen2].parent = eb[jaw] @@ -427,7 +427,7 @@ def control(obj, definitions, base_names, options): # Jaw open tracker jopent = copy_bone_simple(obj.data, jaw_e.name, "MCH-"+base_names[jaw_e.name]+".track", parent=True).name eb[jopent].connected = False - eb[jopent].tail = jaw_e.tail + Vector(0,0,jaw_e.length) + eb[jopent].tail = jaw_e.tail + Vector((0.0, 0.0, jaw_e.length)) eb[jopent].head = jaw_e.tail bpy.ops.object.mode_set(mode='OBJECT') @@ -548,7 +548,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -566,7 +566,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -584,7 +584,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -602,7 +602,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -620,7 +620,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -638,7 +638,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -656,7 +656,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -674,7 +674,7 @@ def control(obj, definitions, base_names, options): con.minimum = 0.0 con.maximum = 1.0 con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() diff --git a/release/scripts/modules/rigify/neck.py b/release/scripts/modules/rigify/neck.py index 7d220663256..0d2ab25bcc9 100644 --- a/release/scripts/modules/rigify/neck.py +++ b/release/scripts/modules/rigify/neck.py @@ -222,7 +222,7 @@ def main(obj, bone_definition, base_names, options): hinge_driver_path = pb[neck_ctrl].path_from_id() + '["hinge"]' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -256,7 +256,7 @@ def main(obj, bone_definition, base_names, options): hinge_driver_path = pb[head_ctrl].path_from_id() + '["hinge"]' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -301,7 +301,7 @@ def main(obj, bone_definition, base_names, options): if i < (len(neck_head)-1): inf = (i+1) / len(neck_head) - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() var.name = "ext" diff --git a/release/scripts/modules/rigify/neck_flex.py b/release/scripts/modules/rigify/neck_flex.py index 514d443a1f9..08f963434d1 100644 --- a/release/scripts/modules/rigify/neck_flex.py +++ b/release/scripts/modules/rigify/neck_flex.py @@ -176,7 +176,7 @@ def main(obj, bone_definition, base_names, options): ex.neck_socket_e.connected = False ex.neck_socket_e.parent = mt.body_e ex.neck_socket_e.head = mt.head_e.head - ex.neck_socket_e.tail = mt.head_e.head - Vector(0.0, neck_chain_segment_length / 2.0, 0.0) + ex.neck_socket_e.tail = mt.head_e.head - Vector((0.0, neck_chain_segment_length / 2.0, 0.0)) ex.neck_socket_e.roll = 0.0 @@ -239,7 +239,7 @@ def main(obj, bone_definition, base_names, options): # add driver hinge_driver_path = ex.head_ctrl_p.path_from_id() + '["hinge"]' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -259,7 +259,7 @@ def main(obj, bone_definition, base_names, options): target_names = [("b%.2d" % (i + 1)) for i in range(len(neck_chain))] ex.head_ctrl_p["bend_tot"] = 0.0 - fcurve = ex.head_ctrl_p.driver_add('["bend_tot"]', 0) + fcurve = ex.head_ctrl_p.driver_add('["bend_tot"]') driver = fcurve.driver driver.type = 'SUM' fcurve.modifiers.remove(0) # grr dont need a modifier @@ -296,7 +296,7 @@ def main(obj, bone_definition, base_names, options): con.owner_space = 'LOCAL' con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'SCRIPTED' driver.expression = "bend/bend_tot" diff --git a/release/scripts/modules/rigify/palm_curl.py b/release/scripts/modules/rigify/palm_curl.py index ed656cf2243..2bdd28a348a 100644 --- a/release/scripts/modules/rigify/palm_curl.py +++ b/release/scripts/modules/rigify/palm_curl.py @@ -254,7 +254,7 @@ def main(obj, bone_definition, base_names, options): child_pbone_02 = obj.pose.bones[children[1]].bone rel_vec = child_pbone_01.head - child_pbone_02.head - x_vec = child_pbone_01.matrix.rotation_part() * Vector(1.0, 0.0, 0.0) + x_vec = child_pbone_01.matrix.rotation_part() * Vector((1.0, 0.0, 0.0)) return degrees(rel_vec.angle(x_vec)) > 90.0 diff --git a/release/scripts/modules/rigify/shape_key_control.py b/release/scripts/modules/rigify/shape_key_control.py index fd0e900a7b5..ac3987ca7e1 100644 --- a/release/scripts/modules/rigify/shape_key_control.py +++ b/release/scripts/modules/rigify/shape_key_control.py @@ -57,7 +57,7 @@ def addget_shape_key_driver(obj, name="Key"): if driver_s.data_path == driver_path: fcurve = driver_s if fcurve == None: - fcurve = obj.data.shape_keys.keys[name].driver_add("value", 0) + fcurve = obj.data.shape_keys.keys[name].driver_add("value") fcurve.driver.type = 'AVERAGE' new = True diff --git a/release/scripts/modules/rigify/shape_key_distance.py b/release/scripts/modules/rigify/shape_key_distance.py index 68501ac829b..06dd3d67d4b 100644 --- a/release/scripts/modules/rigify/shape_key_distance.py +++ b/release/scripts/modules/rigify/shape_key_distance.py @@ -54,7 +54,7 @@ def addget_shape_key_driver(obj, name="Key"): if driver_s.data_path == driver_path: fcurve = driver_s if fcurve == None: - fcurve = obj.data.shape_keys.keys[name].driver_add("value", 0) + fcurve = obj.data.shape_keys.keys[name].driver_add("value") fcurve.driver.type = 'AVERAGE' return fcurve diff --git a/release/scripts/modules/rigify/shape_key_rotdiff.py b/release/scripts/modules/rigify/shape_key_rotdiff.py index 2c30d95e666..7049bcf74bb 100644 --- a/release/scripts/modules/rigify/shape_key_rotdiff.py +++ b/release/scripts/modules/rigify/shape_key_rotdiff.py @@ -54,7 +54,7 @@ def addget_shape_key_driver(obj, name="Key"): if driver_s.data_path == driver_path: fcurve = driver_s if fcurve == None: - fcurve = obj.data.shape_keys.keys[name].driver_add("value", 0) + fcurve = obj.data.shape_keys.keys[name].driver_add("value") fcurve.driver.type = 'AVERAGE' return fcurve diff --git a/release/scripts/modules/rigify/spine_pivot_flex.py b/release/scripts/modules/rigify/spine_pivot_flex.py index 025074490cb..d3bab72d9a1 100644 --- a/release/scripts/modules/rigify/spine_pivot_flex.py +++ b/release/scripts/modules/rigify/spine_pivot_flex.py @@ -177,11 +177,11 @@ def main(obj, bone_definition, base_names, options): # copy the pelvis, offset to make MCH-spine_rotate and MCH-ribcage_hinge ex.ribcage_hinge_e = copy_bone_simple(arm, mt.pelvis, "MCH-%s_hinge" % base_names[mt.ribcage]) ex.ribcage_hinge = ex.ribcage_hinge_e.name - ex.ribcage_hinge_e.translate(Vector(0.0, spine_chain_segment_length / 4.0, 0.0)) + ex.ribcage_hinge_e.translate(Vector((0.0, spine_chain_segment_length / 4.0, 0.0))) ex.spine_rotate_e = copy_bone_simple(arm, mt.ribcage, "MCH-%s_rotate" % spine_chain_basename) ex.spine_rotate = ex.spine_rotate_e.name - ex.spine_rotate_e.translate(Vector(0.0, spine_chain_segment_length / 2.0, 0.0)) + ex.spine_rotate_e.translate(Vector((0.0, spine_chain_segment_length / 2.0, 0.0))) ex.spine_rotate_e.connected = False ex.spine_rotate_e.parent = ex.pelvis_copy_e @@ -294,7 +294,7 @@ def main(obj, bone_definition, base_names, options): con.subtarget = ex.pelvis_copy # add driver - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -350,7 +350,7 @@ def main(obj, bone_definition, base_names, options): rib_driver_path = ex.ribcage_copy_p.path_from_id() ex.ribcage_copy_p["bend_tot"] = 0.0 - fcurve = ex.ribcage_copy_p.driver_add('["bend_tot"]', 0) + fcurve = ex.ribcage_copy_p.driver_add('["bend_tot"]') driver = fcurve.driver driver.type = 'SUM' fcurve.modifiers.remove(0) # grr dont need a modifier @@ -385,7 +385,7 @@ def main(obj, bone_definition, base_names, options): del spine_p # add driver - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'SCRIPTED' driver.expression = "bend/bend_tot" @@ -440,7 +440,7 @@ def main(obj, bone_definition, base_names, options): if i == spine_chain_len: con.head_tail = 1.0 - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' diff --git a/release/scripts/modules/rigify/tail_control.py b/release/scripts/modules/rigify/tail_control.py index 76eaf6dd4d9..47da9778913 100644 --- a/release/scripts/modules/rigify/tail_control.py +++ b/release/scripts/modules/rigify/tail_control.py @@ -135,7 +135,7 @@ def main(obj, bone_definitions, base_names, options): # Add drivers bone_path = pb[bones[0]].path_from_id() - driver_fcurve = con_f.driver_add("influence", 0) + driver_fcurve = con_f.driver_add("influence") driver = driver_fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() @@ -148,7 +148,7 @@ def main(obj, bone_definitions, base_names, options): mod.coefficients[0] = 1.0 mod.coefficients[1] = -1.0 - driver_fcurve = con_h.driver_add("influence", 0) + driver_fcurve = con_h.driver_add("influence") driver = driver_fcurve.driver driver.type = 'AVERAGE' var = driver.variables.new() diff --git a/release/scripts/modules/rigify/tongue.py b/release/scripts/modules/rigify/tongue.py index 43a8c2125ce..b6dfe756b71 100644 --- a/release/scripts/modules/rigify/tongue.py +++ b/release/scripts/modules/rigify/tongue.py @@ -179,7 +179,7 @@ def main(obj, bone_definition, base_names, options): ex.neck_socket_e.connected = False ex.neck_socket_e.parent = mt.body_e ex.neck_socket_e.head = mt.head_e.head - ex.neck_socket_e.tail = mt.head_e.head - Vector(0.0, neck_chain_segment_length / 2.0, 0.0) + ex.neck_socket_e.tail = mt.head_e.head - Vector((0.0, neck_chain_segment_length / 2.0, 0.0)) ex.neck_socket_e.roll = 0.0 @@ -243,7 +243,7 @@ def main(obj, bone_definition, base_names, options): # add driver hinge_driver_path = ex.head_ctrl_p.path_to_id() + '["hinge"]' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver var = driver.variables.new() driver.type = 'AVERAGE' @@ -263,7 +263,7 @@ def main(obj, bone_definition, base_names, options): target_names = [("b%.2d" % (i + 1)) for i in range(len(neck_chain))] ex.head_ctrl_p["bend_tot"] = 0.0 - fcurve = ex.head_ctrl_p.driver_add('["bend_tot"]', 0) + fcurve = ex.head_ctrl_p.driver_add('["bend_tot"]') driver = fcurve.driver driver.type = 'SUM' fcurve.modifiers.remove(0) # grr dont need a modifier @@ -308,7 +308,7 @@ def main(obj, bone_definition, base_names, options): con.owner_space = 'LOCAL' con.target_space = 'LOCAL' - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'SCRIPTED' driver.expression = "bend/bend_tot" diff --git a/release/scripts/modules/rigify_utils.py b/release/scripts/modules/rigify_utils.py index 1d5768e7f22..25ab6bebf48 100644 --- a/release/scripts/modules/rigify_utils.py +++ b/release/scripts/modules/rigify_utils.py @@ -154,7 +154,7 @@ def blend_bone_list(obj, apply_bones, from_bones, to_bones, target_bone=None, ta con.target = obj con.subtarget = to_bone_name - fcurve = con.driver_add("influence", 0) + fcurve = con.driver_add("influence") driver = fcurve.driver driver.type = 'AVERAGE' fcurve.modifiers.remove(0) # grr dont need a modifier @@ -204,12 +204,12 @@ def add_pole_target_bone(obj, base_bone_name, name, mode='CROSS'): offset.length = distance elif mode == 'ZAVERAGE': # between both bones Z axis - z_axis_a = base_ebone.matrix.copy().rotation_part() * Vector(0.0, 0.0, -1.0) - z_axis_b = parent_ebone.matrix.copy().rotation_part() * Vector(0.0, 0.0, -1.0) + z_axis_a = base_ebone.matrix.copy().rotation_part() * Vector((0.0, 0.0, -1.0)) + z_axis_b = parent_ebone.matrix.copy().rotation_part() * Vector((0.0, 0.0, -1.0)) offset = (z_axis_a + z_axis_b).normalize() * distance else: # preset axis - offset = Vector(0, 0, 0) + offset = Vector((0.0, 0.0, 0.0)) if mode[0] == "+": val = distance else: |