Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_nla/nla_edit.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| ot->idname = "NLA_OT_view_all"; | ot->idname = "NLA_OT_view_all"; | ||||
| ot->description = "Reset viewable area to show full strips range"; | ot->description = "Reset viewable area to show full strips range"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = nlaedit_viewall_exec; | ot->exec = nlaedit_viewall_exec; | ||||
| ot->poll = ED_operator_nla_active; | ot->poll = ED_operator_nla_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| void NLA_OT_view_selected(wmOperatorType *ot) | void NLA_OT_view_selected(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "View Selected"; | ot->name = "View Selected"; | ||||
| ot->idname = "NLA_OT_view_selected"; | ot->idname = "NLA_OT_view_selected"; | ||||
| ot->description = "Reset viewable area to show selected strips range"; | ot->description = "Reset viewable area to show selected strips range"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = nlaedit_viewsel_exec; | ot->exec = nlaedit_viewsel_exec; | ||||
| ot->poll = ED_operator_nla_active; | ot->poll = ED_operator_nla_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| /* *********************************************** */ | /* *********************************************** */ | ||||
| static int nlaedit_viewframe_exec(bContext *C, wmOperator *op) | static int nlaedit_viewframe_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 NLA_OT_view_frame(wmOperatorType *ot) | void NLA_OT_view_frame(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "View Frame"; | ot->name = "View Frame"; | ||||
| ot->idname = "NLA_OT_view_frame"; | ot->idname = "NLA_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 = nlaedit_viewframe_exec; | ot->exec = nlaedit_viewframe_exec; | ||||
| ot->poll = ED_operator_nla_active; | ot->poll = ED_operator_nla_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| /* *********************************************** */ | /* *********************************************** */ | ||||
| /* NLA Editing Operations (Constructive/Destructive) */ | /* NLA Editing Operations (Constructive/Destructive) */ | ||||
| /* ******************** Add Action-Clip Operator ***************************** */ | /* ******************** Add Action-Clip Operator ***************************** */ | ||||
| /* Add a new Action-Clip strip to the active track | /* Add a new Action-Clip strip to the active track | ||||
| * (or the active block if no space in the track) */ | * (or the active block if no space in the track) */ | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||