Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_graph/graph_view.c
| Show First 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name View Frame Operator | /** \name View Frame Operator | ||||
| * \{ */ | * \{ */ | ||||
| static int graphkeys_view_frame_exec(bContext *C, wmOperator *op) | static int graphkeys_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); | Scene *scene = CTX_data_scene(C); | ||||
| ANIM_center_frame(C, FPS, scene->r.cfra, smooth_viewtx); | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void GRAPH_OT_view_frame(wmOperatorType *ot) | void GRAPH_OT_view_frame(wmOperatorType *ot) | ||||
| { | { | ||||
| /* Identifiers */ | /* Identifiers */ | ||||
| ot->name = "Go to Current Frame"; | ot->name = "Go to Current Frame"; | ||||
| ot->idname = "GRAPH_OT_view_frame"; | ot->idname = "GRAPH_OT_view_frame"; | ||||
| ▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines | |||||