OSDN Git Service

fix for pmd_import
authorousttrue <ousttrue@gmail.com>
Tue, 28 Dec 2010 16:31:57 +0000 (01:31 +0900)
committerousttrue <ousttrue@gmail.com>
Tue, 28 Dec 2010 16:31:57 +0000 (01:31 +0900)
swig/blender/bl25.py

index c9b72d2..e789db7 100755 (executable)
@@ -10,8 +10,6 @@ try:
 except:
     pass
 
-# \e$B%U%!%$%k%7%9%F%`$NJ8;z%3!<%I\e(B
-# \e$B2~B$HG$H$N6&MQ$N$?$a\e(B
 FS_ENCODING=sys.getfilesystemencoding()
 if os.path.exists(os.path.dirname(sys.argv[0])+"/utf8"):
     INTERNAL_ENCODING='utf-8'
@@ -197,7 +195,10 @@ class object:
 
     @staticmethod
     def addShapeKey(o, name):
-        return o.add_shape_key(name)
+        try:
+            return o.shape_key_add(name)
+        except:
+            return o.add_shape_key(name)
 
     @staticmethod
     def hasShapeKey(o):
@@ -205,7 +206,7 @@ class object:
 
     @staticmethod
     def pinShape(o, enable):
-        o.show_shape_key=enable
+        o.show_only_shape_key=enable
 
     @staticmethod
     def setActivateShapeKey(o, index):