patch [#28320] Small change to trunk needed for Motion Capture Addon - GSoC 2011...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 22 Aug 2011 08:47:48 +0000 (08:47 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 22 Aug 2011 08:47:48 +0000 (08:47 +0000)
from Benjy Cook (benjycook)

release/scripts/startup/bl_operators/nla.py

index 44ed846e530053c0acef8cff618ca7f7f2318915..714b889da26f4cae637e5e3a7a3c6993f69dde3d 100644 (file)
@@ -84,6 +84,7 @@ def bake(frame_start,
          do_pose=True,
          do_object=True,
          do_constraint_clear=False,
+         action=None,
          ):
 
     scene = bpy.context.scene
@@ -121,7 +122,8 @@ def bake(frame_start,
 
     # incase animation data hassnt been created
     atd = obj.animation_data_create()
-    action = bpy.data.actions.new("Action")
+    if action is None:
+        action = bpy.data.actions.new("Action")
     atd.action = action
 
     if do_pose: