Animation: Add "Frame Channel" operators #104523

Merged
Christoph Lendenfeld merged 27 commits from ChrisLend/blender:frame-channel-operator into main 2023-02-17 18:11:10 +01:00
6 changed files with 8 additions and 8 deletions
Showing only changes of commit 84894090a7 - Show all commits

View File

@ -3509,8 +3509,8 @@ def km_animation_channels(params):
# Menus.
*_template_items_context_menu("DOPESHEET_MT_channel_context_menu", params.context_menu_event),
# View
("graph.view_channels", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "alt": True}, None),
("graph.view_channels", {"type": 'NUMPAD_PERIOD', "value": 'PRESS'}, None),
("graph.view_selected_channels", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "alt": True}, None),
("graph.view_selected_channels", {"type": 'NUMPAD_PERIOD', "value": 'PRESS'}, None),
])
return keymap

View File

@ -700,7 +700,7 @@ class DOPESHEET_MT_channel_context_menu(Menu):
layout.operator("anim.channels_ungroup")
layout.separator()
layout.operator("graph.view_channels")
layout.operator("graph.view_selected_channels")
layout.separator()
layout.operator("anim.channels_editable_toggle")

View File

@ -239,7 +239,7 @@ class GRAPH_MT_channel(Menu):
layout.operator("anim.channels_fcurves_enable")
layout.separator()
layout.operator("graph.view_channels")
layout.operator("graph.view_selected_channels")
class GRAPH_MT_key(Menu):

View File

@ -101,7 +101,7 @@ void GRAPH_OT_previewrange_set(struct wmOperatorType *ot);
void GRAPH_OT_view_all(struct wmOperatorType *ot);
void GRAPH_OT_view_selected(struct wmOperatorType *ot);
void GRAPH_OT_view_frame(struct wmOperatorType *ot);
void GRAPH_OT_view_channels(struct wmOperatorType *ot);
void GRAPH_OT_view_selected_channels(struct wmOperatorType *ot);
void GRAPH_OT_click_insert(struct wmOperatorType *ot);
void GRAPH_OT_keyframe_insert(struct wmOperatorType *ot);

View File

@ -423,7 +423,7 @@ void graphedit_operatortypes(void)
WM_operatortype_append(GRAPH_OT_view_all);
WM_operatortype_append(GRAPH_OT_view_selected);
WM_operatortype_append(GRAPH_OT_view_frame);
WM_operatortype_append(GRAPH_OT_view_channels);
WM_operatortype_append(GRAPH_OT_view_selected_channels);
WM_operatortype_append(GRAPH_OT_ghost_curves_create);
WM_operatortype_append(GRAPH_OT_ghost_curves_clear);

View File

@ -453,11 +453,11 @@ static int graphkeys_view_channel_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void GRAPH_OT_view_channels(wmOperatorType *ot)
void GRAPH_OT_view_selected_channels(wmOperatorType *ot)
{
/* Identifiers */
ot->name = "Frame Selected Channels";
ot->idname = "GRAPH_OT_view_channels";
ot->idname = "GRAPH_OT_view_selected_channels";
ot->description = "Reset viewable area to show the selected channels";
/* API callbacks */