diff options
Diffstat (limited to 'release/scripts/modules/rigify/mouth.py')
-rw-r--r-- | release/scripts/modules/rigify/mouth.py | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/release/scripts/modules/rigify/mouth.py b/release/scripts/modules/rigify/mouth.py index 31d7c5a1ce9..d516a48ec95 100644 --- a/release/scripts/modules/rigify/mouth.py +++ b/release/scripts/modules/rigify/mouth.py @@ -21,7 +21,7 @@ import bpy from rna_prop_ui import rna_idprop_ui_prop_get from math import acos, pi -from Mathutils import Vector +from mathutils import Vector from rigify import RigifyError from rigify_utils import copy_bone_simple @@ -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') @@ -448,7 +448,7 @@ def control(obj, definitions, base_names, options): prop["min"] = 0.0 prop["max"] = 1.0 - open_driver_path = pb[lip1].path_to_id() + '["open_action"]' + open_driver_path = pb[lip1].path_from_id() + '["open_action"]' # Constraints @@ -543,12 +543,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() @@ -561,12 +561,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() @@ -579,12 +579,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() @@ -597,12 +597,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() @@ -615,12 +615,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() @@ -633,12 +633,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() @@ -651,12 +651,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() @@ -669,12 +669,12 @@ def control(obj, definitions, base_names, options): con.subtarget = jopent con.action = open_action con.transform_channel = 'SCALE_Y' - con.start_frame = 0 - con.end_frame = 60 + con.frame_start = 0 + con.frame_end = 60 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() |