Animation: Rename ACTION_OT_sample

After Renaming "Bake Curve" to "Samples to Keys" in #111049,
the name of the `ACTION_OT_sample` operator needed renaming.
That is because the word "sample" is now used to describe FCurve
data in an uneditable state.

Rename to `ACTION_OT_bake_keys` since baking is the
term used in animation to describe the action of creating dense key data.

Pull Request: https://projects.blender.org/blender/blender/pulls/112151
This commit is contained in:
Christoph Lendenfeld 2023-09-12 09:42:01 +02:00 committed by Christoph Lendenfeld
parent 9e5e04e915
commit e656e850a6
5 changed files with 11 additions and 11 deletions

@ -2552,7 +2552,7 @@ def km_dopesheet(params):
("action.extrapolation_type", {"type": 'E', "value": 'PRESS', "shift": True}, None),
("action.easing_type", {"type": 'E', "value": 'PRESS', "ctrl": True}, None),
("action.keyframe_type", {"type": 'R', "value": 'PRESS'}, None),
("action.sample", {"type": 'O', "value": 'PRESS', "shift": True, "alt": True}, None),
("action.bake_keys", {"type": 'O', "value": 'PRESS', "shift": True, "alt": True}, None),
op_menu("DOPESHEET_MT_delete", {"type": 'X', "value": 'PRESS'}),
("action.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("confirm", False)]}),
("action.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),

@ -557,7 +557,7 @@ class DOPESHEET_MT_key(Menu):
layout.separator()
layout.operator("action.clean").channels = False
layout.operator("action.clean", text="Clean Channels").channels = True
layout.operator("action.sample")
layout.operator("action.bake_keys")
layout.separator()
layout.operator("graph.euler_filter", text="Discontinuity (Euler) Filter")

@ -1249,7 +1249,7 @@ void ACTION_OT_clean(wmOperatorType *ot)
* \{ */
/* Evaluates the curves between each selected keyframe on each frame, and keys the value. */
static void sample_action_keys(bAnimContext *ac)
static void bake_action_keys(bAnimContext *ac)
{
ListBase anim_data = {nullptr, nullptr};
eAnimFilter_Flags filter;
@ -1272,7 +1272,7 @@ static void sample_action_keys(bAnimContext *ac)
/* ------------------- */
static int actkeys_sample_exec(bContext *C, wmOperator *op)
static int actkeys_bake_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@ -1287,7 +1287,7 @@ static int actkeys_sample_exec(bContext *C, wmOperator *op)
}
/* sample keyframes */
sample_action_keys(&ac);
bake_action_keys(&ac);
/* set notifier that keyframes have changed */
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, nullptr);
@ -1295,15 +1295,15 @@ static int actkeys_sample_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void ACTION_OT_sample(wmOperatorType *ot)
void ACTION_OT_bake_keys(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Sample Keyframes";
ot->idname = "ACTION_OT_sample";
ot->name = "Bake Keyframes";
ot->idname = "ACTION_OT_bake_keys";
ot->description = "Add keyframes on every frame between the selected keyframes";
/* api callbacks */
ot->exec = actkeys_sample_exec;
ot->exec = actkeys_bake_exec;
ot->poll = ED_operator_action_active;
/* flags */

@ -82,7 +82,7 @@ void ACTION_OT_keyframe_insert(wmOperatorType *ot);
void ACTION_OT_duplicate(wmOperatorType *ot);
void ACTION_OT_delete(wmOperatorType *ot);
void ACTION_OT_clean(wmOperatorType *ot);
void ACTION_OT_sample(wmOperatorType *ot);
void ACTION_OT_bake_keys(wmOperatorType *ot);
void ACTION_OT_keyframe_type(wmOperatorType *ot);
void ACTION_OT_handle_type(wmOperatorType *ot);

@ -47,7 +47,7 @@ void action_operatortypes()
WM_operatortype_append(ACTION_OT_extrapolation_type);
WM_operatortype_append(ACTION_OT_easing_type);
WM_operatortype_append(ACTION_OT_keyframe_type);
WM_operatortype_append(ACTION_OT_sample);
WM_operatortype_append(ACTION_OT_bake_keys);
WM_operatortype_append(ACTION_OT_clean);
WM_operatortype_append(ACTION_OT_delete);
WM_operatortype_append(ACTION_OT_duplicate);