diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-12 12:50:35 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-12 12:52:06 +0300 |
commit | e9ffe9335057a4429d909c32a2b0bf03f3a03b3d (patch) | |
tree | 57e9996fa9d868b2dd766cb5faf19d11e1052161 /release/scripts | |
parent | 52baf87f1f12fcaa206bbef514d66c32fadbd9e2 (diff) |
Fix T56766: Bake Action Visual Keying Not Working.
Consequences of new requirement to use named keywords parameters for our
RNA API... Hopefully fixed all other cases in that file as well, but
guess we'll find more of those in comming weeks. :|
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/bpy_extras/anim_utils.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/release/scripts/modules/bpy_extras/anim_utils.py b/release/scripts/modules/bpy_extras/anim_utils.py index 7216add2c2c..c545d237329 100644 --- a/release/scripts/modules/bpy_extras/anim_utils.py +++ b/release/scripts/modules/bpy_extras/anim_utils.py @@ -168,7 +168,8 @@ def bake_action_iter( for name, pbone in obj.pose.bones.items(): if do_visual_keying: # Get the final transform of the bone in its own local space... - matrix[name] = obj.convert_space(pbone, pbone.matrix, 'POSE', 'LOCAL') + matrix[name] = obj.convert_space(pose_bone=pbone, matrix=pbone.matrix, + from_space='POSE', to_space='LOCAL') else: matrix[name] = pbone.matrix_basis.copy() @@ -272,13 +273,13 @@ def bake_action_iter( for (f, matrix, bbones) in pose_info: pbone.matrix_basis = matrix[name].copy() - pbone.keyframe_insert("location", -1, f, name, options) + pbone.keyframe_insert("location", index=-1, frame=f, group=name, options=options) rotation_mode = pbone.rotation_mode if rotation_mode == 'QUATERNION': - pbone.keyframe_insert("rotation_quaternion", -1, f, name, options) + pbone.keyframe_insert("rotation_quaternion", index=-1, frame=f, group=name, options=options) elif rotation_mode == 'AXIS_ANGLE': - pbone.keyframe_insert("rotation_axis_angle", -1, f, name, options) + pbone.keyframe_insert("rotation_axis_angle", index=-1, frame=f, group=name, options=options) else: # euler, XYZ, ZXY etc if euler_prev is not None: euler = pbone.rotation_euler.copy() @@ -288,9 +289,9 @@ def bake_action_iter( del euler else: euler_prev = pbone.rotation_euler.copy() - pbone.keyframe_insert("rotation_euler", -1, f, name, options) + pbone.keyframe_insert("rotation_euler", index=-1, frame=f, group=name, options=options) - pbone.keyframe_insert("scale", -1, f, name, options) + pbone.keyframe_insert("scale", index=-1, frame=f, group=name, options=options) # Bendy Bones if pbone.bone.bbone_segments > 1: @@ -298,7 +299,7 @@ def bake_action_iter( for bb_prop in BBONE_PROPS: # update this property with value from bbone_shape, then key it setattr(pbone, bb_prop, bbone_shape[bb_prop]) - pbone.keyframe_insert(bb_prop, -1, f, name, options) + pbone.keyframe_insert(bb_prop, index=-1, frame=f, group=name, options=options) # object. TODO. multiple objects if do_object: @@ -313,13 +314,13 @@ def bake_action_iter( name = "Action Bake" # XXX: placeholder obj.matrix_basis = matrix - obj.keyframe_insert("location", -1, f, name, options) + obj.keyframe_insert("location", index=-1, frame=f, group=name, options=options) rotation_mode = obj.rotation_mode if rotation_mode == 'QUATERNION': - obj.keyframe_insert("rotation_quaternion", -1, f, name, options) + obj.keyframe_insert("rotation_quaternion", index=-1, frame=f, group=name, options=options) elif rotation_mode == 'AXIS_ANGLE': - obj.keyframe_insert("rotation_axis_angle", -1, f, name, options) + obj.keyframe_insert("rotation_axis_angle", index=-1, frame=f, group=name, options=options) else: # euler, XYZ, ZXY etc if euler_prev is not None: euler = obj.rotation_euler.copy() @@ -329,9 +330,9 @@ def bake_action_iter( del euler else: euler_prev = obj.rotation_euler.copy() - obj.keyframe_insert("rotation_euler", -1, f, name, options) + obj.keyframe_insert("rotation_euler", index=-1, frame=f, group=name, options=options) - obj.keyframe_insert("scale", -1, f, name, options) + obj.keyframe_insert("scale", index=-1, frame=f, group=name, options=options) if do_parents_clear: obj.parent = None |