Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_action/action_edit.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| ot->idname = "ACTION_OT_view_all"; | ot->idname = "ACTION_OT_view_all"; | ||||
| ot->description = "Reset viewable area to show full keyframe range"; | ot->description = "Reset viewable area to show full keyframe range"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = actkeys_viewall_exec; | ot->exec = actkeys_viewall_exec; | ||||
| ot->poll = ED_operator_action_active; | ot->poll = ED_operator_action_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| void ACTION_OT_view_selected(wmOperatorType *ot) | void ACTION_OT_view_selected(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "View Selected"; | ot->name = "View Selected"; | ||||
| ot->idname = "ACTION_OT_view_selected"; | ot->idname = "ACTION_OT_view_selected"; | ||||
| ot->description = "Reset viewable area to show selected keyframes range"; | ot->description = "Reset viewable area to show selected keyframes range"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = actkeys_viewsel_exec; | ot->exec = actkeys_viewsel_exec; | ||||
| ot->poll = ED_operator_action_active; | ot->poll = ED_operator_action_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| /* ****************** View-All Operator ****************** */ | /* ****************** View-All Operator ****************** */ | ||||
| static int actkeys_view_frame_exec(bContext *C, wmOperator *op) | static int actkeys_view_frame_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); | const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); | ||||
| ANIM_center_frame(C, smooth_viewtx); | ANIM_center_frame(C, smooth_viewtx); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void ACTION_OT_view_frame(wmOperatorType *ot) | void ACTION_OT_view_frame(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "View Frame"; | ot->name = "View Frame"; | ||||
| ot->idname = "ACTION_OT_view_frame"; | ot->idname = "ACTION_OT_view_frame"; | ||||
| ot->description = "Reset viewable area to show range around current frame"; | ot->description = "Reset viewable area to show range around current frame"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = actkeys_view_frame_exec; | ot->exec = actkeys_view_frame_exec; | ||||
| ot->poll = ED_operator_action_active; | ot->poll = ED_operator_action_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| /* ************************************************************************** */ | /* ************************************************************************** */ | ||||
| /* GENERAL STUFF */ | /* GENERAL STUFF */ | ||||
| /* ******************** Copy/Paste Keyframes Operator ************************* */ | /* ******************** Copy/Paste Keyframes Operator ************************* */ | ||||
| /* NOTE: the backend code for this is shared with the graph editor */ | /* NOTE: the backend code for this is shared with the graph editor */ | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||