瀏覽代碼

Fixed bone matching for raw animation fcurves in Blender exporter.

alteredq 13 年之前
父節點
當前提交
836e31a236
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      utils/exporters/blender/2.63/scripts/addons/io_mesh_threejs/export_threejs.py

+ 8 - 2
utils/exporters/blender/2.63/scripts/addons/io_mesh_threejs/export_threejs.py

@@ -907,6 +907,8 @@ def position(bone, frame):
     action = bpy.data.actions[0]
     ngroups = len(action.groups)
 
+
+
     if ngroups > 0:
 
         index = 0
@@ -922,9 +924,11 @@ def position(bone, frame):
 
     else:
 
+        bone_label = '"%s"' % bone.name
+
         for channel in action.fcurves:
             data_path = channel.data_path
-            if bone.name in data_path and "location" in data_path:
+            if bone_label in data_path and "location" in data_path:
                 hasChanged = handle_position_channel(channel, frame, position)
                 change = change or hasChanged
 
@@ -1005,9 +1009,11 @@ def rotation(bone, frame):
 
     else:
 
+        bone_label = '"%s"' % bone.name
+
         for channel in action.fcurves:
             data_path = channel.data_path
-            if bone.name in data_path and "quaternion" in data_path:
+            if bone_label in data_path and "quaternion" in data_path:
                 hasChanged = handle_rotation_channel(channel, frame, rotation)
                 change = change or hasChanged