Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-09-10 07:27:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-10 07:30:00 +0300
commitd98d1dc3d837dfaf1b2c832f20a8ec8504968fc0 (patch)
treed0776ba1a54b6d42e2b5c80d956dc3495e829ad5
parentc4fc81ee4b357425e11ec284d8d1def8e662a0aa (diff)
Update for changes in Blender
-rw-r--r--mocap/mocap_constraints.py16
-rw-r--r--mocap/retarget.py10
2 files changed, 18 insertions, 8 deletions
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