[Bf-extensions-cvs] [d98d1dc3] master: Update for changes in Blender

Campbell Barton noreply at git.blender.org
Sun Sep 10 06:22:23 CEST 2017


Commit: d98d1dc3d837dfaf1b2c832f20a8ec8504968fc0
Author: Campbell Barton
Date:   Sun Sep 10 14:27:56 2017 +1000
Branches: master
https://developer.blender.org/rBAd98d1dc3d837dfaf1b2c832f20a8ec8504968fc0

Update for changes in Blender

===================================================================

M	mocap/mocap_constraints.py
M	mocap/retarget.py

===================================================================

diff --git a/mocap/mocap_constraints.py b/mocap/mocap_constraints.py
index 4509193c..d263dfad 100644
--- a/mocap/mocap_constraints.py
+++ b/mocap/mocap_constraints.py
@@ -385,13 +385,15 @@ def bakeAllConstraints(obj, s_frame, e_frame, bones):
     constraintStrip.frame_end = e_frame
     if selectedBones:
         # Use bake function from NLA Bake Action operator
-        anim_utils.bake_action(s_frame,
-                               e_frame,
-                               action=constraintStrip.action,
-                               only_selected=True,
-                               do_pose=True,
-                               do_object=False,
-                               )
+        anim_utils.bake_action(
+            obj,
+            s_frame,
+            e_frame,
+            action=constraintStrip.action,
+            only_selected=True,
+            do_pose=True,
+            do_object=False,
+        )
     if simpleBake:
         #Do a "simple" bake, location only, world space only.
         locBake(s_frame, e_frame, simpleBake)
diff --git a/mocap/retarget.py b/mocap/retarget.py
index 66c62280..d0b203cd 100644
--- a/mocap/retarget.py
+++ b/mocap/retarget.py
@@ -521,7 +521,15 @@ def totalRetarget(performer_obj, enduser_obj, scene, s_frame, e_frame):
     else:
         prepareForBake(enduser_obj)
         print("Retargeting pose (Advanced Retarget)")
-        bake_action(s_frame, e_frame, action=enduser_obj.animation_data.action, only_selected=True, do_pose=True, do_object=False, frame_step=step)
+        bake_action(
+            bpy.context.object,
+            s_frame, e_frame,
+            action=enduser_obj.animation_data.action,
+            only_selected=True,
+            do_pose=True,
+            do_object=False,
+            frame_step=step,
+        )
     name = performer_obj.animation_data.action.name[:10]
     #We trim the name down to 10 chars because of Action Name length maximum
     enduser_obj.animation_data.action.name = "Base " + name



More information about the Bf-extensions-cvs mailing list