[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4134] contrib/py/scripts/addons/ io_import_lipSync_Importer.py: -fix the context restriction issue

yousef harfoush bat3a at msn.com
Thu Jan 3 21:45:24 CET 2013


Revision: 4134
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4134
Author:   bat3a
Date:     2013-01-03 20:45:23 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
-fix the context restriction issue
-upped the version
-removed changing user pref. to relative paths

Modified Paths:
--------------
    contrib/py/scripts/addons/io_import_lipSync_Importer.py

Modified: contrib/py/scripts/addons/io_import_lipSync_Importer.py
===================================================================
--- contrib/py/scripts/addons/io_import_lipSync_Importer.py	2013-01-03 13:16:58 UTC (rev 4133)
+++ contrib/py/scripts/addons/io_import_lipSync_Importer.py	2013-01-03 20:45:23 UTC (rev 4134)
@@ -19,8 +19,8 @@
 bl_info = {
     "name": "LipSync Importer & Blinker",
     "author": "Yousef Harfoush - bat3a ;)",
-    "version": (0, 5, 0),
-    "blender": (2, 62, 0),
+    "version": (0, 5, 1),
+    "blender": (2, 65, 0),
     "location": "3D window > Tool Shelf",
     "description": "Plot Moho (Papagayo, Jlipsync, Yolo) file to frames and adds automatic blinking",
     "warning": "",
@@ -37,10 +37,6 @@
 global lastPhoneme
 lastPhoneme="nothing"
 
-# truning off relative path - it causes an error if it was true
-if bpy.context.user_preferences.filepaths.use_relative_paths == True:
-    bpy.context.user_preferences.filepaths.use_relative_paths = False
-
 # add blinking
 def blinker():
     
@@ -104,11 +100,11 @@
         else:
             exec("bone.%s = %f" % (attribute, 0.0))
 
-def addBoneKey(bone, data_path, index=-1, value=None, frame=bpy.context.scene.frame_current, group=""):
+def addBoneKey(bone, data_path, index=-1, value=None, frame=0, group=""):
     # set a value and keyframe for the bone
     # it assumes the 'bone' variable was defined before
     # and it's the current selected bone
-
+    frame=bpy.context.scene.frame_current
     if value != None:
         if index != -1:
             # bone.location[0] = 0.0
@@ -337,7 +333,6 @@
     bl_label = "LipSync Importer & Blinker"
     
     newType= bpy.types.Scene
-    scn = bpy.context.scene
     
     newType.fpath = StringProperty(name="Import File ", description="Select your voice file", subtype="FILE_PATH")
     newType.skscale = FloatProperty(description="Smoothing shape key values", min=0.1, max=1.0, default=0.8)



More information about the Bf-extensions-cvs mailing list