Skip to content
Snippets Groups Projects
Commit 72fc6599 authored by Campbell Barton's avatar Campbell Barton
Browse files

update mocap utils for changes in blenders modules

parent 9bb9621e
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
import bpy import bpy
from mathutils import Vector from mathutils import Vector
from bl_operators import nla from bpy_extras import anim_utils
from . import retarget from . import retarget
...@@ -383,8 +383,14 @@ def bakeAllConstraints(obj, s_frame, e_frame, bones): ...@@ -383,8 +383,14 @@ def bakeAllConstraints(obj, s_frame, e_frame, bones):
constraintStrip.frame_start = s_frame constraintStrip.frame_start = s_frame
constraintStrip.frame_end = e_frame constraintStrip.frame_end = e_frame
if selectedBones: if selectedBones:
#Use bake function from NLA Bake Action operator # Use bake function from NLA Bake Action operator
nla.bake(s_frame, e_frame, action=constraintStrip.action, only_selected=True, do_pose=True, do_object=False) anim_utils.bake_action(s_frame,
e_frame,
action=constraintStrip.action,
only_selected=True,
do_pose=True,
do_object=False,
)
if simpleBake: if simpleBake:
#Do a "simple" bake, location only, world space only. #Do a "simple" bake, location only, world space only.
locBake(s_frame, e_frame, simpleBake) locBake(s_frame, e_frame, simpleBake)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment