diff options
Diffstat (limited to 'source/blender/editors/interface/view2d_ops.c')
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 95df3ef9c53..6da9512f9e0 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -239,11 +239,11 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void View2D_OT_view_pan(wmOperatorType *ot) +void VIEW2D_OT_pan(wmOperatorType *ot) { /* identifiers */ ot->name= "Pan View"; - ot->idname= "View2D_OT_view_pan"; + ot->idname= "VIEW2D_OT_pan"; /* api callbacks */ ot->exec= view_pan_exec; @@ -287,11 +287,11 @@ static int view_scrollright_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void View2D_OT_view_scrollright(wmOperatorType *ot) +void VIEW2D_OT_scroll_right(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Right"; - ot->idname= "View2D_OT_view_rightscroll"; + ot->idname= "VIEW2D_OT_scroll_right"; /* api callbacks */ ot->exec= view_scrollright_exec; @@ -333,11 +333,11 @@ static int view_scrollleft_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void View2D_OT_view_scrollleft(wmOperatorType *ot) +void VIEW2D_OT_scroll_left(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Left"; - ot->idname= "View2D_OT_view_leftscroll"; + ot->idname= "VIEW2D_OT_scroll_left"; /* api callbacks */ ot->exec= view_scrollleft_exec; @@ -378,11 +378,11 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void View2D_OT_view_scrolldown(wmOperatorType *ot) +void VIEW2D_OT_scroll_down(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Down"; - ot->idname= "View2D_OT_view_downscroll"; + ot->idname= "VIEW2D_OT_scroll_down"; /* api callbacks */ ot->exec= view_scrolldown_exec; @@ -424,11 +424,11 @@ static int view_scrollup_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void View2D_OT_view_scrollup(wmOperatorType *ot) +void VIEW2D_OT_scroll_up(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroll Up"; - ot->idname= "View2D_OT_view_upscroll"; + ot->idname= "VIEW2D_OT_scroll_up"; /* api callbacks */ ot->exec= view_scrollup_exec; @@ -524,11 +524,11 @@ static int view_zoomin_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void View2D_OT_view_zoomin(wmOperatorType *ot) +void VIEW2D_OT_zoom_in(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom In"; - ot->idname= "View2D_OT_view_zoomin"; + ot->idname= "VIEW2D_OT_zoom_in"; /* api callbacks */ ot->exec= view_zoomin_exec; @@ -560,11 +560,11 @@ static int view_zoomout_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void View2D_OT_view_zoomout(wmOperatorType *ot) +void VIEW2D_OT_zoom_out(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom Out"; - ot->idname= "View2D_OT_view_zoomout"; + ot->idname= "VIEW2D_OT_zoom_out"; /* api callbacks */ ot->exec= view_zoomout_exec; @@ -794,11 +794,11 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void View2D_OT_view_zoom(wmOperatorType *ot) +void VIEW2D_OT_zoom(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom View"; - ot->idname= "View2D_OT_view_zoom"; + ot->idname= "VIEW2D_OT_zoom"; /* api callbacks */ ot->exec= view_zoomdrag_exec; @@ -892,11 +892,11 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void View2D_OT_view_borderzoom(wmOperatorType *ot) +void VIEW2D_OT_zoom_border(wmOperatorType *ot) { /* identifiers */ ot->name= "Zoom to Border"; - ot->idname= "View2D_OT_view_borderzoom"; + ot->idname= "VIEW2D_OT_zoom_border"; /* api callbacks */ ot->invoke= WM_border_select_invoke; @@ -1232,11 +1232,11 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* LMB-Drag in Scrollers - not repeatable operator! */ -void View2D_OT_scroller_activate(wmOperatorType *ot) +void VIEW2D_OT_scroller_activate(wmOperatorType *ot) { /* identifiers */ ot->name= "Scroller Activate"; - ot->idname= "View2D_OT_scroller_activate"; + ot->idname= "VIEW2D_OT_scroller_activate"; /* api callbacks */ ot->invoke= scroller_activate_invoke; @@ -1248,20 +1248,20 @@ void View2D_OT_scroller_activate(wmOperatorType *ot) void ui_view2d_operatortypes(void) { - WM_operatortype_append(View2D_OT_view_pan); + WM_operatortype_append(VIEW2D_OT_pan); - WM_operatortype_append(View2D_OT_view_scrollleft); - WM_operatortype_append(View2D_OT_view_scrollright); - WM_operatortype_append(View2D_OT_view_scrollup); - WM_operatortype_append(View2D_OT_view_scrolldown); + WM_operatortype_append(VIEW2D_OT_scroll_left); + WM_operatortype_append(VIEW2D_OT_scroll_right); + WM_operatortype_append(VIEW2D_OT_scroll_up); + WM_operatortype_append(VIEW2D_OT_scroll_down); - WM_operatortype_append(View2D_OT_view_zoomin); - WM_operatortype_append(View2D_OT_view_zoomout); + WM_operatortype_append(VIEW2D_OT_zoom_in); + WM_operatortype_append(VIEW2D_OT_zoom_out); - WM_operatortype_append(View2D_OT_view_zoom); - WM_operatortype_append(View2D_OT_view_borderzoom); + WM_operatortype_append(VIEW2D_OT_zoom); + WM_operatortype_append(VIEW2D_OT_zoom_border); - WM_operatortype_append(View2D_OT_scroller_activate); + WM_operatortype_append(VIEW2D_OT_scroller_activate); } void UI_view2d_keymap(wmWindowManager *wm) @@ -1269,43 +1269,43 @@ void UI_view2d_keymap(wmWindowManager *wm) ListBase *keymap= WM_keymap_listbase(wm, "View2D", 0, 0); /* pan/scroll */ - WM_keymap_add_item(keymap, "View2D_OT_view_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_pan", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_rightscroll", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_leftscroll", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_downscroll", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_upscroll", WHEELUPMOUSE, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, KM_SHIFT, 0); /* zoom - single step */ - WM_keymap_add_item(keymap, "View2D_OT_view_zoomout", WHEELOUTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_zoomin", WHEELINMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_zoomout", PADMINUS, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_zoomin", PADPLUSKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_out", WHEELOUTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_in", WHEELINMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_out", PADMINUS, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0); /* scroll up/down - no modifiers, only when zoom fails */ /* these may fail if zoom is disallowed, in which case they should pass on event */ - WM_keymap_add_item(keymap, "View2D_OT_view_downscroll", WHEELDOWNMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_upscroll", WHEELUPMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0); /* these may be necessary if vertical scroll is disallowed */ - WM_keymap_add_item(keymap, "View2D_OT_view_rightscroll", WHEELDOWNMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_leftscroll", WHEELUPMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", WHEELDOWNMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", WHEELUPMOUSE, KM_PRESS, 0, 0); /* zoom - drag */ - WM_keymap_add_item(keymap, "View2D_OT_view_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); /* borderzoom - drag */ - WM_keymap_add_item(keymap, "View2D_OT_view_borderzoom", BKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0); /* scrollers */ - WM_keymap_add_item(keymap, "View2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0); /* Alternative keymap for buttons listview */ keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_downscroll", WHEELDOWNMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_upscroll", WHEELUPMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "View2D_OT_view_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); } |