Bugfix [#33946] Bake Action fails in SVN for Objects
authorJoshua Leung <aligorith@gmail.com>
Mon, 21 Jan 2013 02:40:51 +0000 (02:40 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 21 Jan 2013 02:40:51 +0000 (02:40 +0000)
The problems here were caused by a cleanup commit (r. 53369).
BTW, the code here is pretty convoluted mess.

release/scripts/modules/bpy_extras/anim_utils.py

index 7a5d169..20a9a41 100644 (file)
@@ -169,15 +169,16 @@ def bake_action(frame_start,
         euler_prev = None
 
         for (f, matrix) in zip(frame_range, obj_info):
-            obj.matrix_basis = matrix[name]
+            name = "Action Bake" # XXX: placeholder
+            obj.matrix_basis = matrix
 
-            obj.keyframe_insert("location", -1, f, options)
+            obj.keyframe_insert("location", -1, f, name, options)
 
             rotation_mode = obj.rotation_mode
             if rotation_mode == 'QUATERNION':
-                obj.keyframe_insert("rotation_quaternion", -1, f, options)
+                obj.keyframe_insert("rotation_quaternion", -1, f, name, options)
             elif rotation_mode == 'AXIS_ANGLE':
-                obj.keyframe_insert("rotation_axis_angle", -1, f, options)
+                obj.keyframe_insert("rotation_axis_angle", -1, f, name, options)
             else:  # euler, XYZ, ZXY etc
                 if euler_prev is not None:
                     euler = obj.rotation_euler.copy()
@@ -187,9 +188,9 @@ def bake_action(frame_start,
                     del euler
                 else:
                     euler_prev = obj.rotation_euler.copy()
-                obj.keyframe_insert("rotation_euler", -1, f, options)
+                obj.keyframe_insert("rotation_euler", -1, f, name, options)
 
-            obj.keyframe_insert("scale", -1, f, options)
+            obj.keyframe_insert("scale", -1, f, name, options)
 
     # -------------------------------------------------------------------------
     # Clean