Skip to content

Commit

Permalink
baking operator is one more time broken. Really fed up to constantly …
Browse files Browse the repository at this point in the history
…fixing the same issue. Maybe one day 2.80 will be stable
  • Loading branch information
spoonless committed May 28, 2019
1 parent 2981653 commit d0025ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bake_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ def _bake_action(self, context, *source_bones):
source_bones_matrix_basis.append(context.object.pose.bones[source_bone.name].matrix_basis.copy())
source_bone.select = True

bpy.ops.nla.bake(frame_start=self.frame_start, frame_end=self.frame_end, only_selected=True, bake_types={'POSE'}, visual_keying=True)
# bpy.ops.nla.bake(frame_start=self.frame_start, frame_end=self.frame_end, only_selected=True, bake_types={'POSE'}, visual_keying=True)
# temporary fixing broken nla.bake operator by using anim_utils
from bpy_extras.anim_utils import bake_action
bake_action(context.object, action=None, frames=range(self.frame_start, self.frame_end), do_pose=True, only_selected=True, do_visual_keying=True)
bpy.context.view_layer.update()
baked_action = context.object.animation_data.action

# restoring context
Expand Down

0 comments on commit d0025ad

Please sign in to comment.