From 72fc659967222d0f83468b64af3fcf36ec116835 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Thu, 22 Sep 2011 22:52:34 +0000 Subject: [PATCH] update mocap utils for changes in blenders modules --- mocap/mocap_constraints.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mocap/mocap_constraints.py b/mocap/mocap_constraints.py index 58fbdbac8..a8d88c3a4 100644 --- a/mocap/mocap_constraints.py +++ b/mocap/mocap_constraints.py @@ -20,7 +20,7 @@ import bpy from mathutils import Vector -from bl_operators import nla +from bpy_extras import anim_utils from . import retarget @@ -383,8 +383,14 @@ def bakeAllConstraints(obj, s_frame, e_frame, bones): constraintStrip.frame_start = s_frame constraintStrip.frame_end = e_frame if selectedBones: - #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) + # 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, + ) if simpleBake: #Do a "simple" bake, location only, world space only. locBake(s_frame, e_frame, simpleBake) -- GitLab