fix for baking actions for objects with no animation data.

This commit is contained in:
Campbell Barton 2011-06-16 07:48:22 +00:00
parent 4a5a9dc71c
commit 3ede710a3c

@ -118,8 +118,10 @@ def bake(frame_start,
# -------------------------------------------------------------------------
# Create action
# incase animation data hassnt been created
atd = obj.animation_data_create()
action = bpy.data.actions.new("Action")
obj.animation_data.action = action
atd.action = action
if do_pose:
pose_items = pose.bones.items()