diff options
Diffstat (limited to 'source/blender/editors/animation/anim_ops.c')
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 9b9c9435518..c08b902a13e 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -31,6 +31,8 @@ #include "BLO_sys_types.h" +#include "BLI_utildefines.h" + #include "DNA_anim_types.h" #include "DNA_scene_types.h" @@ -45,6 +47,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_anim_api.h" #include "ED_screen.h" #include "anim_intern.h" @@ -151,7 +154,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void ANIM_OT_change_frame(wmOperatorType *ot) +static void ANIM_OT_change_frame(wmOperatorType *ot) { /* identifiers */ ot->name= "Change frame"; @@ -206,18 +209,19 @@ static int previewrange_define_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_previewrange_set(wmOperatorType *ot) +static void ANIM_OT_previewrange_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set Preview Range"; ot->idname= "ANIM_OT_previewrange_set"; + ot->description= "Interactively define frame range used for playback"; /* api callbacks */ ot->invoke= WM_border_select_invoke; ot->exec= previewrange_define_exec; ot->modal= WM_border_select_modal; - ot->poll= ED_operator_areaactive; + ot->poll= ED_operator_animview_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -233,7 +237,7 @@ void ANIM_OT_previewrange_set(wmOperatorType *ot) /* ****************** clear preview range operator ****************************/ -static int previewrange_clear_exec(bContext *C, wmOperator *op) +static int previewrange_clear_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene= CTX_data_scene(C); ScrArea *curarea= CTX_wm_area(C); @@ -252,16 +256,17 @@ static int previewrange_clear_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_previewrange_clear(wmOperatorType *ot) +static void ANIM_OT_previewrange_clear(wmOperatorType *ot) { /* identifiers */ ot->name= "Clear Preview Range"; ot->idname= "ANIM_OT_previewrange_clear"; + ot->description= "Clear Preview Range"; /* api callbacks */ ot->exec= previewrange_clear_exec; - ot->poll= ED_operator_areaactive; + ot->poll= ED_operator_animview_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; @@ -269,7 +274,7 @@ void ANIM_OT_previewrange_clear(wmOperatorType *ot) /* ****************** time display toggle operator ****************************/ -static int toggle_time_exec(bContext *C, wmOperator *op) +static int toggle_time_exec(bContext *C, wmOperator *UNUSED(op)) { ScrArea *curarea= CTX_wm_area(C); @@ -319,16 +324,17 @@ static int toggle_time_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ANIM_OT_time_toggle(wmOperatorType *ot) +static void ANIM_OT_time_toggle(wmOperatorType *ot) { /* identifiers */ ot->name= "Toggle Frames/Seconds"; ot->idname= "ANIM_OT_time_toggle"; + ot->description= "Toggle whether timing is displayed in frames or seconds for active timeline view"; /* api callbacks */ ot->exec= toggle_time_exec; - ot->poll= ED_operator_areaactive; + ot->poll= ED_operator_animview_active; } /* ************************** registration **********************************/ |