Fix T82210: Animation, Bake Action cleanup

Make post-bake cleanup of the Bake Action operator optional, and disable
by default.

Previously Bake Action would do two things:
- Bake the Action
- Clean up the FCurves

It is now possible (and even the default) to only perform the baking
operation.

Reviewed By: #animation_rigging, looch, sybren

Maniphest Tasks: T82210

Differential Revision: https://developer.blender.org/D9453
This commit is contained in:
Sybren A. Stüvel 2020-11-09 12:41:46 +01:00
parent 118e31a0a9
commit 5da05dd627
Notes: blender-bot 2023-02-14 10:11:49 +01:00
Referenced by issue #82210, "Bake Action..." bakes wrong on flat curves
1 changed files with 6 additions and 1 deletions

View File

@ -247,6 +247,11 @@ class NLA_OT_bake(Operator):
"(useful for baking only part of bones in an armature)",
default=False,
)
clean_curves: BoolProperty(
name="Clean Curves",
description="After baking curves, remove redundant keys",
default=False,
)
bake_types: EnumProperty(
name="Bake Data",
description="Which data's transformations to bake",
@ -282,7 +287,7 @@ class NLA_OT_bake(Operator):
do_visual_keying=self.visual_keying,
do_constraint_clear=self.clear_constraints,
do_parents_clear=self.clear_parents,
do_clean=True,
do_clean=self.clean_curves,
)
if not any(actions):