From 0b98a679bb799fe496be67d8dd52fadef3c1027a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 5 Oct 2018 10:27:04 +1000 Subject: UI: rename Border Select -> Box Select See: T56648 --- .../blender/editors/animation/anim_channels_edit.c | 36 +++++++-------- source/blender/editors/animation/anim_markers.c | 30 ++++++------- source/blender/editors/animation/anim_ops.c | 10 ++--- source/blender/editors/datafiles/CMakeLists.txt | 2 +- .../blender/editors/gpencil/editaction_gpencil.c | 2 +- source/blender/editors/gpencil/gpencil_intern.h | 2 +- source/blender/editors/gpencil/gpencil_ops.c | 14 +++--- source/blender/editors/gpencil/gpencil_select.c | 18 ++++---- source/blender/editors/include/ED_gpencil.h | 2 +- source/blender/editors/include/ED_mask.h | 2 +- source/blender/editors/include/ED_particle.h | 2 +- source/blender/editors/interface/view2d_ops.c | 12 ++--- source/blender/editors/mask/mask_edit.c | 4 +- source/blender/editors/mask/mask_editaction.c | 2 +- source/blender/editors/mask/mask_intern.h | 2 +- source/blender/editors/mask/mask_select.c | 20 ++++----- source/blender/editors/mesh/editmesh_select.c | 2 +- source/blender/editors/physics/particle_edit.c | 4 +- source/blender/editors/screen/screen_ops.c | 24 +++++----- source/blender/editors/sculpt_paint/paint_hide.c | 4 +- source/blender/editors/sculpt_paint/paint_mask.c | 2 +- source/blender/editors/sculpt_paint/paint_ops.c | 2 +- .../blender/editors/space_action/action_intern.h | 2 +- source/blender/editors/space_action/action_ops.c | 8 ++-- .../blender/editors/space_action/action_select.c | 52 +++++++++++----------- source/blender/editors/space_clip/clip_graph_ops.c | 32 ++++++------- source/blender/editors/space_clip/clip_intern.h | 4 +- source/blender/editors/space_clip/space_clip.c | 8 ++-- .../blender/editors/space_clip/tracking_select.c | 20 ++++----- source/blender/editors/space_file/file_intern.h | 2 +- source/blender/editors/space_file/file_ops.c | 30 ++++++------- source/blender/editors/space_file/space_file.c | 6 +-- source/blender/editors/space_graph/graph_intern.h | 2 +- source/blender/editors/space_graph/graph_ops.c | 12 ++--- source/blender/editors/space_graph/graph_select.c | 40 ++++++++--------- source/blender/editors/space_image/image_ops.c | 14 +++--- source/blender/editors/space_info/info_intern.h | 2 +- source/blender/editors/space_info/info_report.c | 24 +++++----- source/blender/editors/space_info/space_info.c | 4 +- source/blender/editors/space_nla/nla_intern.h | 2 +- source/blender/editors/space_nla/nla_ops.c | 8 ++-- source/blender/editors/space_nla/nla_select.c | 50 ++++++++++----------- source/blender/editors/space_node/node_edit.c | 8 ++-- source/blender/editors/space_node/node_intern.h | 2 +- source/blender/editors/space_node/node_ops.c | 6 +-- source/blender/editors/space_node/node_select.c | 28 ++++++------ .../editors/space_outliner/outliner_intern.h | 2 +- .../blender/editors/space_outliner/outliner_ops.c | 4 +- .../editors/space_outliner/outliner_select.c | 26 +++++------ .../editors/space_sequencer/sequencer_edit.c | 12 ++--- .../editors/space_sequencer/sequencer_intern.h | 2 +- .../editors/space_sequencer/sequencer_ops.c | 4 +- .../editors/space_sequencer/sequencer_select.c | 24 +++++----- source/blender/editors/space_view3d/view3d_edit.c | 24 +++++----- .../blender/editors/space_view3d/view3d_intern.h | 2 +- source/blender/editors/space_view3d/view3d_ops.c | 4 +- .../blender/editors/space_view3d/view3d_select.c | 30 ++++++------- source/blender/editors/space_view3d/view3d_view.c | 2 +- source/blender/editors/uvedit/uvedit_ops.c | 30 ++++++------- source/blender/makesrna/intern/rna_scene.c | 2 +- source/blender/windowmanager/WM_api.h | 14 +++--- .../blender/windowmanager/intern/wm_gesture_ops.c | 18 ++++---- .../windowmanager/intern/wm_operator_props.c | 14 +++--- source/blender/windowmanager/intern/wm_operators.c | 44 +++++++++--------- .../blender/windowmanager/intern/wm_toolsystem.c | 2 +- source/blender/windowmanager/wm_event_types.h | 2 +- 66 files changed, 413 insertions(+), 413 deletions(-) (limited to 'source') diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 26ef7f5ee73..ce60fce23fc 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -2383,9 +2383,9 @@ static void ANIM_OT_channels_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } -/* ******************** Borderselect Operator *********************** */ +/* ******************** Box Select Operator *********************** */ -static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selectmode) +static void box_select_anim_channels(bAnimContext *ac, rcti *rect, short selectmode) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -2414,7 +2414,7 @@ static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selec filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); - /* loop over data, doing border select */ + /* loop over data, doing box select */ for (ale = anim_data.first; ale; ale = ale->next) { if (ac->datatype == ANIMCONT_NLA) ymin = ymax - NLACHANNEL_STEP(snla); @@ -2459,7 +2459,7 @@ static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selec /* ------------------- */ -static int animchannels_borderselect_exec(bContext *C, wmOperator *op) +static int animchannels_box_select_exec(bContext *C, wmOperator *op) { bAnimContext ac; rcti rect; @@ -2485,8 +2485,8 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op) selectmode = ACHANNEL_SETFLAG_CLEAR; } - /* apply borderselect animation channels */ - borderselect_anim_channels(&ac, &rect, selectmode); + /* apply box_select animation channels */ + box_select_anim_channels(&ac, &rect, selectmode); /* send notifier that things have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL); @@ -2494,18 +2494,18 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static void ANIM_OT_channels_select_border(wmOperatorType *ot) +static void ANIM_OT_channels_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "ANIM_OT_channels_select_border"; + ot->name = "Box Select"; + ot->idname = "ANIM_OT_channels_select_box"; ot->description = "Select all animation channels within the specified region"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = animchannels_borderselect_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = animchannels_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = animedit_poll_channels_nla_tweakmode_off; @@ -2513,7 +2513,7 @@ static void ANIM_OT_channels_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } /* ******************* Rename Operator ***************************** */ @@ -3162,7 +3162,7 @@ static void ANIM_OT_channel_select_keys(wmOperatorType *ot) void ED_operatortypes_animchannels(void) { WM_operatortype_append(ANIM_OT_channels_select_all); - WM_operatortype_append(ANIM_OT_channels_select_border); + WM_operatortype_append(ANIM_OT_channels_select_box); WM_operatortype_append(ANIM_OT_channels_click); WM_operatortype_append(ANIM_OT_channel_select_keys); @@ -3216,9 +3216,9 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf) /* deselect all */ ED_keymap_template_select_all(keymap, "ANIM_OT_channels_select_all"); - /* borderselect */ - WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", EVT_TWEAK_L, KM_ANY, 0, 0); + /* box select */ + WM_keymap_add_item(keymap, "ANIM_OT_channels_select_box", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "ANIM_OT_channels_select_box", EVT_TWEAK_L, KM_ANY, 0, 0); /* delete */ WM_keymap_add_item(keymap, "ANIM_OT_channels_delete", XKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index a1e7df39014..e44edae22a1 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -1254,7 +1254,7 @@ static void MARKER_OT_select(wmOperatorType *ot) #endif } -/* *************************** border select markers **************** */ +/* *************************** box select markers **************** */ /* operator state vars used: (added by default WM callbacks) * xmin, ymin @@ -1275,7 +1275,7 @@ static void MARKER_OT_select(wmOperatorType *ot) * poll() has to be filled in by user for context */ -static int ed_marker_border_select_exec(bContext *C, wmOperator *op) +static int ed_marker_box_select_exec(bContext *C, wmOperator *op) { View2D *v2d = UI_view2d_fromcontext(C); ListBase *markers = ED_context_get_markers(C); @@ -1311,23 +1311,23 @@ static int ed_marker_border_select_exec(bContext *C, wmOperator *op) return 1; } -static int ed_marker_select_border_invoke_wrapper(bContext *C, wmOperator *op, const wmEvent *event) +static int ed_marker_select_box_invoke_wrapper(bContext *C, wmOperator *op, const wmEvent *event) { - return ed_markers_opwrap_invoke_custom(C, op, event, WM_gesture_border_invoke); + return ed_markers_opwrap_invoke_custom(C, op, event, WM_gesture_box_invoke); } -static void MARKER_OT_select_border(wmOperatorType *ot) +static void MARKER_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Marker Border Select"; - ot->description = "Select all time markers using border selection"; - ot->idname = "MARKER_OT_select_border"; + ot->name = "Marker Box Select"; + ot->description = "Select all time markers using box selection"; + ot->idname = "MARKER_OT_select_box"; /* api callbacks */ - ot->exec = ed_marker_border_select_exec; - ot->invoke = ed_marker_select_border_invoke_wrapper; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->exec = ed_marker_box_select_exec; + ot->invoke = ed_marker_select_box_invoke_wrapper; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ed_markers_poll_markers_exist; @@ -1335,7 +1335,7 @@ static void MARKER_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } /* *********************** (de)select all ***************** */ @@ -1636,7 +1636,7 @@ void ED_operatortypes_marker(void) WM_operatortype_append(MARKER_OT_move); WM_operatortype_append(MARKER_OT_duplicate); WM_operatortype_append(MARKER_OT_select); - WM_operatortype_append(MARKER_OT_select_border); + WM_operatortype_append(MARKER_OT_select_box); WM_operatortype_append(MARKER_OT_select_all); WM_operatortype_append(MARKER_OT_delete); WM_operatortype_append(MARKER_OT_rename); @@ -1671,7 +1671,7 @@ void ED_keymap_marker(wmKeyConfig *keyconf) (void)kmi; #endif - WM_keymap_verify_item(keymap, "MARKER_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_verify_item(keymap, "MARKER_OT_select_box", BKEY, KM_PRESS, 0, 0); ED_keymap_template_select_all(keymap, "MARKER_OT_select_all"); diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 5ec38025ade..c45b7b4b228 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -401,7 +401,7 @@ static int previewrange_define_exec(bContext *C, wmOperator *op) float sfra, efra; rcti rect; - /* get min/max values from border select rect (already in region coordinates, not screen) */ + /* get min/max values from box select rect (already in region coordinates, not screen) */ WM_operator_properties_border_to_rcti(op, &rect); /* convert min/max values to frames (i.e. region to 'tot' rect) */ @@ -434,10 +434,10 @@ static void ANIM_OT_previewrange_set(wmOperatorType *ot) ot->description = "Interactively define frame range used for playback"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = previewrange_define_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_animview_active; @@ -448,7 +448,7 @@ static void ANIM_OT_previewrange_set(wmOperatorType *ot) /* used to define frame range. * * note: border Y values are not used, - * but are needed by borderselect gesture operator stuff */ + * but are needed by box_select gesture operator stuff */ WM_operator_properties_border(ot); } diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index aa764535349..3e7f7063235 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -599,7 +599,7 @@ set_property(GLOBAL PROPERTY ICON_GEOM_NAMES ops.curve.draw ops.curve.dupli_extrude_cursor ops.generic.cursor - ops.generic.select_border + ops.generic.select_box ops.generic.select_circle ops.generic.select_lasso ops.gpencil.draw diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 269f53e42ca..08680ba1e88 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -191,7 +191,7 @@ void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode) } /* select the frames in this layer that occur within the bounds specified */ -void ED_gplayer_frames_select_border(bGPDlayer *gpl, float min, float max, short select_mode) +void ED_gplayer_frames_select_box(bGPDlayer *gpl, float min, float max, short select_mode) { bGPDframe *gpf; diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 1de69cc79ff..42d15c92ff2 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -296,7 +296,7 @@ void GPENCIL_OT_selection_opacity_toggle(struct wmOperatorType *ot); void GPENCIL_OT_select(struct wmOperatorType *ot); void GPENCIL_OT_select_all(struct wmOperatorType *ot); void GPENCIL_OT_select_circle(struct wmOperatorType *ot); -void GPENCIL_OT_select_border(struct wmOperatorType *ot); +void GPENCIL_OT_select_box(struct wmOperatorType *ot); void GPENCIL_OT_select_lasso(struct wmOperatorType *ot); void GPENCIL_OT_select_linked(struct wmOperatorType *ot); diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index 9749038cee6..eec059a59d1 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -205,8 +205,8 @@ static void ed_keymap_gpencil_selection(wmKeyMap *keymap) /* circle select */ WM_keymap_add_item(keymap, "GPENCIL_OT_select_circle", CKEY, KM_PRESS, 0, 0); - /* border select */ - WM_keymap_add_item(keymap, "GPENCIL_OT_select_border", BKEY, KM_PRESS, 0, 0); + /* box select */ + WM_keymap_add_item(keymap, "GPENCIL_OT_select_box", BKEY, KM_PRESS, 0, 0); /* lasso select */ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); @@ -514,8 +514,8 @@ static void ed_keymap_gpencil_painting_draw(wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "wait_for_input", false); /* Selection (used by eraser) */ - /* border select */ - WM_keymap_add_item(keymap, "GPENCIL_OT_select_border", BKEY, KM_PRESS, 0, 0); + /* box select */ + WM_keymap_add_item(keymap, "GPENCIL_OT_select_box", BKEY, KM_PRESS, 0, 0); /* lasso select */ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0); @@ -541,8 +541,8 @@ static void ed_keymap_gpencil_painting_erase(wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "wait_for_input", false); /* Selection (used by eraser) */ - /* border select */ - WM_keymap_add_item(keymap, "GPENCIL_OT_select_border", BKEY, KM_PRESS, 0, 0); + /* box select */ + WM_keymap_add_item(keymap, "GPENCIL_OT_select_box", BKEY, KM_PRESS, 0, 0); /* lasso select */ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0); @@ -689,7 +689,7 @@ void ED_operatortypes_gpencil(void) WM_operatortype_append(GPENCIL_OT_select); WM_operatortype_append(GPENCIL_OT_select_all); WM_operatortype_append(GPENCIL_OT_select_circle); - WM_operatortype_append(GPENCIL_OT_select_border); + WM_operatortype_append(GPENCIL_OT_select_box); WM_operatortype_append(GPENCIL_OT_select_lasso); WM_operatortype_append(GPENCIL_OT_select_linked); diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index ea60d30d94f..34bd49e9fcf 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -1017,7 +1017,7 @@ void GPENCIL_OT_select_circle(wmOperatorType *ot) /* ********************************************** */ /* Box Selection */ -static int gpencil_border_select_exec(bContext *C, wmOperator *op) +static int gpencil_box_select_exec(bContext *C, wmOperator *op) { bGPdata *gpd = ED_gpencil_data_get_active(C); ToolSettings *ts = CTX_data_tool_settings(C); @@ -1134,18 +1134,18 @@ static int gpencil_border_select_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GPENCIL_OT_select_border(wmOperatorType *ot) +void GPENCIL_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; + ot->name = "Box Select"; ot->description = "Select Grease Pencil strokes within a rectangular region"; - ot->idname = "GPENCIL_OT_select_border"; + ot->idname = "GPENCIL_OT_select_box"; /* callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = gpencil_border_select_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = gpencil_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = gpencil_select_poll; @@ -1153,7 +1153,7 @@ void GPENCIL_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } /* ********************************************** */ diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 09095ede556..f00063755d2 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -172,7 +172,7 @@ void ED_gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, bool only bool ED_gplayer_frame_select_check(struct bGPDlayer *gpl); void ED_gplayer_frame_select_set(struct bGPDlayer *gpl, short mode); -void ED_gplayer_frames_select_border(struct bGPDlayer *gpl, float min, float max, short select_mode); +void ED_gplayer_frames_select_box(struct bGPDlayer *gpl, float min, float max, short select_mode); void ED_gplayer_frames_select_region(struct KeyframeEditData *ked, struct bGPDlayer *gpl, short tool, short select_mode); void ED_gpencil_select_frames(struct bGPDlayer *gpl, short select_mode); void ED_gpencil_select_frame(struct bGPDlayer *gpl, int selx, short select_mode); diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h index 2ab788d5e2a..af9d87b8e0e 100644 --- a/source/blender/editors/include/ED_mask.h +++ b/source/blender/editors/include/ED_mask.h @@ -80,7 +80,7 @@ void ED_masklayer_make_cfra_list(struct MaskLayer *masklay, ListBase *elems, boo bool ED_masklayer_frame_select_check(struct MaskLayer *masklay); void ED_masklayer_frame_select_set(struct MaskLayer *masklay, short mode); -void ED_masklayer_frames_select_border(struct MaskLayer *masklay, float min, float max, short select_mode); +void ED_masklayer_frames_select_box(struct MaskLayer *masklay, float min, float max, short select_mode); void ED_masklayer_frames_select_region(struct KeyframeEditData *ked, struct MaskLayer *masklay, short tool, short select_mode); void ED_mask_select_frames(struct MaskLayer *masklay, short select_mode); void ED_mask_select_frame(struct MaskLayer *masklay, int selx, short select_mode); diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index 552975b9e55..7e7198a8ace 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -62,7 +62,7 @@ void PE_update_object( /* selection tools */ int PE_mouse_particles(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); -int PE_border_select(struct bContext *C, const struct rcti *rect, const int sel_op); +int PE_box_select(struct bContext *C, const struct rcti *rect, const int sel_op); int PE_circle_select(struct bContext *C, int selecting, const int mval[2], float rad); int PE_lasso_select(struct bContext *C, const int mcords[][2], const short moves, const int sel_op); void PE_deselect_all_visible(struct PTCacheEdit *edit); diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index f2411c1861a..5ea09a40ac8 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1222,7 +1222,7 @@ static void VIEW2D_OT_zoom(wmOperatorType *ot) /* BORDER-ZOOM */ /** - * The user defines a rect using standard borderselect tools, and we use this rect to + * The user defines a rect using standard box select tools, and we use this rect to * define the new zoom-level of the view in the following ways: * * -# LEFTMOUSE - zoom in to view @@ -1302,15 +1302,15 @@ static void VIEW2D_OT_zoom_border(wmOperatorType *ot) ot->idname = "VIEW2D_OT_zoom_border"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = view_borderzoom_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = view_zoom_poll; /* rna */ - WM_operator_properties_gesture_border_zoom(ot); + WM_operator_properties_gesture_box_zoom(ot); } #ifdef WITH_INPUT_NDOF @@ -1566,7 +1566,7 @@ static void VIEW2D_OT_smoothview(wmOperatorType *ot) ot->flag = OPTYPE_INTERNAL; /* rna */ - WM_operator_properties_gesture_border(ot); + WM_operator_properties_gesture_box(ot); } /* ********************************************************* */ diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index 19861a75e4e..5d9c8209c81 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -480,7 +480,7 @@ void ED_operatortypes_mask(void) /* select */ WM_operatortype_append(MASK_OT_select); WM_operatortype_append(MASK_OT_select_all); - WM_operatortype_append(MASK_OT_select_border); + WM_operatortype_append(MASK_OT_select_box); WM_operatortype_append(MASK_OT_select_lasso); WM_operatortype_append(MASK_OT_select_circle); WM_operatortype_append(MASK_OT_select_linked_pick); @@ -564,7 +564,7 @@ void ED_keymap_mask(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "MASK_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "deselect", true); - WM_keymap_add_item(keymap, "MASK_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MASK_OT_select_box", BKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MASK_OT_select_circle", CKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "MASK_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0); diff --git a/source/blender/editors/mask/mask_editaction.c b/source/blender/editors/mask/mask_editaction.c index 21f406c7657..00db3c6e659 100644 --- a/source/blender/editors/mask/mask_editaction.c +++ b/source/blender/editors/mask/mask_editaction.c @@ -187,7 +187,7 @@ void ED_mask_select_frame(MaskLayer *masklay, int selx, short select_mode) } /* select the frames in this layer that occur within the bounds specified */ -void ED_masklayer_frames_select_border(MaskLayer *masklay, float min, float max, short select_mode) +void ED_masklayer_frames_select_box(MaskLayer *masklay, float min, float max, short select_mode) { MaskLayerShape *masklay_shape; diff --git a/source/blender/editors/mask/mask_intern.h b/source/blender/editors/mask/mask_intern.h index e9ef06a368f..cb2bb953994 100644 --- a/source/blender/editors/mask/mask_intern.h +++ b/source/blender/editors/mask/mask_intern.h @@ -103,7 +103,7 @@ void MASK_OT_parent_clear(struct wmOperatorType *ot); void MASK_OT_select(struct wmOperatorType *ot); void MASK_OT_select_all(struct wmOperatorType *ot); -void MASK_OT_select_border(struct wmOperatorType *ot); +void MASK_OT_select_box(struct wmOperatorType *ot); void MASK_OT_select_lasso(struct wmOperatorType *ot); void MASK_OT_select_circle(struct wmOperatorType *ot); void MASK_OT_select_linked_pick(struct wmOperatorType *ot); diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c index 530b7bd968c..a5daa7b4565 100644 --- a/source/blender/editors/mask/mask_select.c +++ b/source/blender/editors/mask/mask_select.c @@ -396,9 +396,9 @@ void MASK_OT_select(wmOperatorType *ot) -/********************** border select operator *********************/ +/********************** box select operator *********************/ -static int border_select_exec(bContext *C, wmOperator *op) +static int box_select_exec(bContext *C, wmOperator *op) { ScrArea *sa = CTX_wm_area(C); ARegion *ar = CTX_wm_region(C); @@ -462,24 +462,24 @@ static int border_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void MASK_OT_select_border(wmOperatorType *ot) +void MASK_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->description = "Select curve points using border selection"; - ot->idname = "MASK_OT_select_border"; + ot->name = "Box Select"; + ot->description = "Select curve points using box selection"; + ot->idname = "MASK_OT_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = border_select_exec; - ot->modal = WM_gesture_border_modal; + ot->invoke = WM_gesture_box_invoke; + ot->exec = box_select_exec; + ot->modal = WM_gesture_box_modal; ot->poll = ED_maskedit_mask_poll; /* flags */ ot->flag = OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } static bool do_lasso_select_mask(bContext *C, const int mcords[][2], short moves, bool select, bool extend) diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index e335c1971f9..270b13bd1d7 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -206,7 +206,7 @@ void EDBM_automerge(Scene *scene, Object *obedit, bool update, const char hflag) unsigned int bm_solidoffs = 0, bm_wireoffs = 0, bm_vertoffs = 0; /* set in drawobject.c ... for colorindices */ -/* facilities for border select and circle select */ +/* facilities for box select and circle select */ static BLI_bitmap *selbuf = NULL; static BLI_bitmap *edbm_backbuf_alloc(const int size) diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index bb69c40e932..8009148480e 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1967,7 +1967,7 @@ void PARTICLE_OT_select_linked(wmOperatorType *ot) RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "", 0, 16384); } -/************************ border select operator ************************/ +/************************ box select operator ************************/ void PE_deselect_all_visible(PTCacheEdit *edit) { POINT_P; KEY_K; @@ -1980,7 +1980,7 @@ void PE_deselect_all_visible(PTCacheEdit *edit) } } -int PE_border_select(bContext *C, const rcti *rect, const int sel_op) +int PE_box_select(bContext *C, const rcti *rect, const int sel_op) { Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 9ce0956aa66..72d5783255d 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -4206,7 +4206,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Border Select Operator (Template) +/** \name Box Select Operator (Template) * \{ */ /* operator state vars used: (added by default WM callbacks) @@ -4228,31 +4228,31 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot) * poll() has to be filled in by user for context */ #if 0 -static int border_select_exec(bContext *C, wmOperator *op) +static int box_select_exec(bContext *C, wmOperator *op) { int event_type = RNA_int_get(op->ptr, "event_type"); if (event_type == LEFTMOUSE) - printf("border select do select\n"); + printf("box select do select\n"); else if (event_type == RIGHTMOUSE) - printf("border select deselect\n"); + printf("box select deselect\n"); else - printf("border select do something\n"); + printf("box select do something\n"); return 1; } -static void SCREEN_OT_border_select(wmOperatorType *ot) +static void SCREEN_OT_box_select(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "SCREEN_OT_border_select"; + ot->name = "Box Select"; + ot->idname = "SCREEN_OT_box_select"; /* api callbacks */ - ot->exec = border_select_exec; - ot->invoke = WM_gesture_border_invoke; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->exec = box_select_exec; + ot->invoke = WM_gesture_box_invoke; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_areaactive; diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index 0336928a7c9..6faabe66462 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -443,7 +443,7 @@ static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event) PartialVisArea area = RNA_enum_get(op->ptr, "area"); if (!ELEM(area, PARTIALVIS_ALL, PARTIALVIS_MASKED)) - return WM_gesture_border_invoke(C, op, event); + return WM_gesture_box_invoke(C, op, event); else return op->type->exec(C, op); } @@ -471,7 +471,7 @@ void PAINT_OT_hide_show(struct wmOperatorType *ot) /* api callbacks */ ot->invoke = hide_show_invoke; - ot->modal = WM_gesture_border_modal; + ot->modal = WM_gesture_box_modal; ot->exec = hide_show_exec; /* sculpt-only for now */ ot->poll = sculpt_mode_poll_view3d; diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index a09c04f6fb0..b8175e3d368 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -201,7 +201,7 @@ void PAINT_OT_mask_flood_fill(struct wmOperatorType *ot) "Mask level to use when mode is 'Value'; zero means no masking and one is fully masked", 0, 1); } -/* Box select, operator is VIEW3D_OT_select_border, defined in view3d_select.c */ +/* Box select, operator is VIEW3D_OT_select_box, defined in view3d_select.c */ static bool is_effected(float planes[4][4], const float co[3]) { diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 7cc2c66d068..278d02a768c 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -1447,7 +1447,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ED_keymap_template_select_all(keymap, "PAINT_OT_vert_select_all"); - WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW3D_OT_select_box", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "mode", SEL_OP_ADD); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0); diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index bb8de677b57..986afe96e11 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -63,7 +63,7 @@ void timeline_draw_cache(struct SpaceAction *saction, struct Object *ob, struct /* action_select.c */ void ACTION_OT_select_all(struct wmOperatorType *ot); -void ACTION_OT_select_border(struct wmOperatorType *ot); +void ACTION_OT_select_box(struct wmOperatorType *ot); void ACTION_OT_select_lasso(struct wmOperatorType *ot); void ACTION_OT_select_circle(struct wmOperatorType *ot); void ACTION_OT_select_column(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index 8f3bbaa0bf5..24798938fa6 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -61,7 +61,7 @@ void action_operatortypes(void) /* selection */ WM_operatortype_append(ACTION_OT_clickselect); WM_operatortype_append(ACTION_OT_select_all); - WM_operatortype_append(ACTION_OT_select_border); + WM_operatortype_append(ACTION_OT_select_box); WM_operatortype_append(ACTION_OT_select_lasso); WM_operatortype_append(ACTION_OT_select_circle); WM_operatortype_append(ACTION_OT_select_column); @@ -174,10 +174,10 @@ static void action_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap) /* deselect all */ ED_keymap_template_select_all(keymap, "ACTION_OT_select_all"); - /* borderselect */ - kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0); + /* box_select */ + kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_box", BKEY, KM_PRESS, 0, 0); RNA_boolean_set(kmi->ptr, "axis_range", false); - kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_box", BKEY, KM_PRESS, KM_ALT, 0); RNA_boolean_set(kmi->ptr, "axis_range", true); /* region select */ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 9168ef8575e..f85177f5228 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -207,7 +207,7 @@ void ACTION_OT_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } -/* ******************** Border Select Operator **************************** */ +/* ******************** Box Select Operator **************************** */ /* This operator currently works in one of three ways: * -> BKEY - 1) all keyframes within region are selected (ACTKEYS_BORDERSEL_ALLKEYS) * -> ALT-BKEY - depending on which axis of the region was larger... @@ -215,15 +215,15 @@ void ACTION_OT_select_all(wmOperatorType *ot) * -> 3) y-axis, so select all frames within channels that region included (ACTKEYS_BORDERSEL_CHANNELS) */ -/* defines for borderselect mode */ +/* defines for box_select mode */ enum { ACTKEYS_BORDERSEL_ALLKEYS = 0, ACTKEYS_BORDERSEL_FRAMERANGE, ACTKEYS_BORDERSEL_CHANNELS, -} /*eActKeys_BorderSelect_Mode*/; +} /*eActKeys_BoxSelect_Mode*/; -static void borderselect_action(bAnimContext *ac, const rcti rect, short mode, short selectmode) +static void box_select_action(bAnimContext *ac, const rcti rect, short mode, short selectmode) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -254,7 +254,7 @@ static void borderselect_action(bAnimContext *ac, const rcti rect, short mode, s /* init editing data */ memset(&ked, 0, sizeof(KeyframeEditData)); - /* loop over data, doing border select */ + /* loop over data, doing box select */ for (ale = anim_data.first; ale; ale = ale->next) { AnimData *adt = ANIM_nla_mapping_get(ac, ale); @@ -288,7 +288,7 @@ static void borderselect_action(bAnimContext *ac, const rcti rect, short mode, s bGPdata *gpd = ale->data; bGPDlayer *gpl; for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { - ED_gplayer_frames_select_border(gpl, rectf.xmin, rectf.xmax, selectmode); + ED_gplayer_frames_select_box(gpl, rectf.xmin, rectf.xmax, selectmode); } ale->update |= ANIM_UPDATE_DEPS; break; @@ -296,7 +296,7 @@ static void borderselect_action(bAnimContext *ac, const rcti rect, short mode, s #endif case ANIMTYPE_GPLAYER: { - ED_gplayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode); + ED_gplayer_frames_select_box(ale->data, rectf.xmin, rectf.xmax, selectmode); ale->update |= ANIM_UPDATE_DEPS; break; } @@ -305,12 +305,12 @@ static void borderselect_action(bAnimContext *ac, const rcti rect, short mode, s Mask *mask = ale->data; MaskLayer *masklay; for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { - ED_masklayer_frames_select_border(masklay, rectf.xmin, rectf.xmax, selectmode); + ED_masklayer_frames_select_box(masklay, rectf.xmin, rectf.xmax, selectmode); } break; } case ANIMTYPE_MASKLAYER: - ED_masklayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode); + ED_masklayer_frames_select_box(ale->data, rectf.xmin, rectf.xmax, selectmode); break; default: ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL); @@ -329,7 +329,7 @@ static void borderselect_action(bAnimContext *ac, const rcti rect, short mode, s /* ------------------- */ -static int actkeys_borderselect_exec(bContext *C, wmOperator *op) +static int actkeys_box_select_exec(bContext *C, wmOperator *op) { bAnimContext ac; rcti rect; @@ -356,7 +356,7 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op) selectmode = SELECT_SUBTRACT; } - /* selection 'mode' depends on whether borderselect region only matters on one axis */ + /* selection 'mode' depends on whether box_select region only matters on one axis */ if (RNA_boolean_get(op->ptr, "axis_range")) { /* mode depends on which axis of the range is larger to determine which axis to use * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size @@ -371,8 +371,8 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op) else mode = ACTKEYS_BORDERSEL_ALLKEYS; - /* apply borderselect action */ - borderselect_action(&ac, rect, mode, selectmode); + /* apply box_select action */ + box_select_action(&ac, rect, mode, selectmode); /* set notifier that keyframe selection have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); @@ -380,18 +380,18 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void ACTION_OT_select_border(wmOperatorType *ot) +void ACTION_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "ACTION_OT_select_border"; + ot->name = "Box Select"; + ot->idname = "ACTION_OT_select_box"; ot->description = "Select all keyframes within the specified region"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = actkeys_borderselect_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = actkeys_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_action_active; @@ -399,7 +399,7 @@ void ACTION_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); } @@ -573,7 +573,7 @@ static int actkeys_lassoselect_exec(bContext *C, wmOperator *op) BLI_lasso_boundbox(&rect, data_lasso.mcords, data_lasso.mcords_tot); BLI_rctf_rcti_copy(&rect_fl, &rect); - /* apply borderselect action */ + /* apply box_select action */ region_select_action_keys(&ac, &rect_fl, BEZT_OK_CHANNEL_LASSO, selectmode, &data_lasso); MEM_freeN((void *)data_lasso.mcords); @@ -720,11 +720,11 @@ static void markers_selectkeys_between(bAnimContext *ac) ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else if (ale->type == ANIMTYPE_GPLAYER) { - ED_gplayer_frames_select_border(ale->data, min, max, SELECT_ADD); + ED_gplayer_frames_select_box(ale->data, min, max, SELECT_ADD); ale->update |= ANIM_UPDATE_DEPS; } else if (ale->type == ANIMTYPE_MASKLAYER) { - ED_masklayer_frames_select_border(ale->data, min, max, SELECT_ADD); + ED_masklayer_frames_select_box(ale->data, min, max, SELECT_ADD); } else { ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL); @@ -1104,11 +1104,11 @@ static void actkeys_select_leftright(bAnimContext *ac, short leftright, short se ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else if (ale->type == ANIMTYPE_GPLAYER) { - ED_gplayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode); + ED_gplayer_frames_select_box(ale->data, ked.f1, ked.f2, select_mode); ale->update |= ANIM_UPDATE_DEPS; } else if (ale->type == ANIMTYPE_MASKLAYER) { - ED_masklayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode); + ED_masklayer_frames_select_box(ale->data, ked.f1, ked.f2, select_mode); } else { ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL); diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index 5b51f70c447..06233d64a36 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -329,17 +329,17 @@ void CLIP_OT_graph_select(wmOperatorType *ot) "Extend", "Extend selection rather than clearing the existing selection"); } -/********************** border select operator *********************/ +/********************** box select operator *********************/ -typedef struct BorderSelectuserData { +typedef struct BoxSelectuserData { rctf rect; bool select, extend, changed; -} BorderSelectuserData; +} BoxSelectuserData; -static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track), +static void box_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track), MovieTrackingMarker *marker, int coord, int scene_framenr, float val) { - BorderSelectuserData *data = (BorderSelectuserData *) userdata; + BoxSelectuserData *data = (BoxSelectuserData *) userdata; if (BLI_rctf_isect_pt(&data->rect, scene_framenr, val)) { int flag = 0; @@ -362,7 +362,7 @@ static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track), } } -static int border_select_graph_exec(bContext *C, wmOperator *op) +static int box_select_graph_exec(bContext *C, wmOperator *op) { SpaceClip *sc = CTX_wm_space_clip(C); ARegion *ar = CTX_wm_region(C); @@ -370,7 +370,7 @@ static int border_select_graph_exec(bContext *C, wmOperator *op) MovieClip *clip = ED_space_clip_get_clip(sc); MovieTracking *tracking = &clip->tracking; MovieTrackingTrack *act_track = BKE_tracking_track_get_active(tracking); - BorderSelectuserData userdata; + BoxSelectuserData userdata; rctf rect; if (act_track == NULL) { @@ -385,7 +385,7 @@ static int border_select_graph_exec(bContext *C, wmOperator *op) userdata.select = !RNA_boolean_get(op->ptr, "deselect"); userdata.extend = RNA_boolean_get(op->ptr, "extend"); - clip_graph_tracking_values_iterate_track(sc, act_track, &userdata, border_select_cb, NULL, NULL); + clip_graph_tracking_values_iterate_track(sc, act_track, &userdata, box_select_cb, NULL, NULL); if (userdata.changed) { WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL); @@ -396,24 +396,24 @@ static int border_select_graph_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void CLIP_OT_graph_select_border(wmOperatorType *ot) +void CLIP_OT_graph_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->description = "Select curve points using border selection"; - ot->idname = "CLIP_OT_graph_select_border"; + ot->name = "Box Select"; + ot->description = "Select curve points using box selection"; + ot->idname = "CLIP_OT_graph_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = border_select_graph_exec; - ot->modal = WM_gesture_border_modal; + ot->invoke = WM_gesture_box_invoke; + ot->exec = box_select_graph_exec; + ot->modal = WM_gesture_box_modal; ot->poll = clip_graph_knots_poll; /* flags */ ot->flag = OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } /********************** select all operator *********************/ diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index e5c4f567d5c..b407056ea96 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -84,7 +84,7 @@ void clip_draw_graph(struct SpaceClip *sc, struct ARegion *ar, struct Scene *sce void ED_clip_graph_center_current_frame(struct Scene *scene, struct ARegion *ar); void CLIP_OT_graph_select(struct wmOperatorType *ot); -void CLIP_OT_graph_select_border(struct wmOperatorType *ot); +void CLIP_OT_graph_select_box(struct wmOperatorType *ot); void CLIP_OT_graph_select_all_markers(struct wmOperatorType *ot); void CLIP_OT_graph_delete_curve(struct wmOperatorType *ot); void CLIP_OT_graph_delete_knot(struct wmOperatorType *ot); @@ -212,7 +212,7 @@ void CLIP_OT_keyframe_delete(struct wmOperatorType *ot); /* tracking_select.c */ void CLIP_OT_select(struct wmOperatorType *ot); void CLIP_OT_select_all(struct wmOperatorType *ot); -void CLIP_OT_select_border(struct wmOperatorType *ot); +void CLIP_OT_select_box(struct wmOperatorType *ot); void CLIP_OT_select_lasso(struct wmOperatorType *ot); void CLIP_OT_select_circle(struct wmOperatorType *ot); void CLIP_OT_select_grouped(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index f38a1dc056a..8afc0c33271 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -447,7 +447,7 @@ static void clip_operatortypes(void) /* selection */ WM_operatortype_append(CLIP_OT_select); WM_operatortype_append(CLIP_OT_select_all); - WM_operatortype_append(CLIP_OT_select_border); + WM_operatortype_append(CLIP_OT_select_box); WM_operatortype_append(CLIP_OT_select_lasso); WM_operatortype_append(CLIP_OT_select_circle); WM_operatortype_append(CLIP_OT_select_grouped); @@ -521,7 +521,7 @@ static void clip_operatortypes(void) /* selection */ WM_operatortype_append(CLIP_OT_graph_select); - WM_operatortype_append(CLIP_OT_graph_select_border); + WM_operatortype_append(CLIP_OT_graph_select_box); WM_operatortype_append(CLIP_OT_graph_select_all_markers); WM_operatortype_append(CLIP_OT_graph_delete_curve); @@ -649,7 +649,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf) ED_keymap_template_select_all(keymap, "CLIP_OT_select_all"); - WM_keymap_add_item(keymap, "CLIP_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "CLIP_OT_select_box", BKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "CLIP_OT_select_circle", CKEY, KM_PRESS, 0, 0); WM_keymap_add_menu(keymap, "CLIP_MT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); @@ -750,7 +750,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf) ED_keymap_template_select_all(keymap, "CLIP_OT_graph_select_all_markers"); - WM_keymap_add_item(keymap, "CLIP_OT_graph_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "CLIP_OT_graph_select_box", BKEY, KM_PRESS, 0, 0); /* delete */ WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_curve", XKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index 7fb2e32770d..162948c8e64 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -427,9 +427,9 @@ void CLIP_OT_select(wmOperatorType *ot) "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds", -100.0f, 100.0f); } -/********************** border select operator *********************/ +/********************** box select operator *********************/ -static int border_select_exec(bContext *C, wmOperator *op) +static int box_select_exec(bContext *C, wmOperator *op) { SpaceClip *sc = CTX_wm_space_clip(C); ARegion *ar = CTX_wm_region(C); @@ -519,24 +519,24 @@ static int border_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void CLIP_OT_select_border(wmOperatorType *ot) +void CLIP_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->description = "Select markers using border selection"; - ot->idname = "CLIP_OT_select_border"; + ot->name = "Box Select"; + ot->description = "Select markers using box selection"; + ot->idname = "CLIP_OT_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = border_select_exec; - ot->modal = WM_gesture_border_modal; + ot->invoke = WM_gesture_box_invoke; + ot->exec = box_select_exec; + ot->modal = WM_gesture_box_modal; ot->poll = ED_space_clip_tracking_poll; /* flags */ ot->flag = OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } /********************** lasso select operator *********************/ diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index 48acbdb137d..710aa472a8b 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -73,7 +73,7 @@ void FILE_OT_highlight(struct wmOperatorType *ot); void FILE_OT_select(struct wmOperatorType *ot); void FILE_OT_select_walk(struct wmOperatorType *ot); void FILE_OT_select_all(struct wmOperatorType *ot); -void FILE_OT_select_border(struct wmOperatorType *ot); +void FILE_OT_select_box(struct wmOperatorType *ot); void FILE_OT_select_bookmark(struct wmOperatorType *ot); void FILE_OT_bookmark_add(struct wmOperatorType *ot); void FILE_OT_bookmark_delete(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index c70829f08f4..a583dce51c8 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -113,7 +113,7 @@ typedef enum FileSelect { static void clamp_to_filelist(int numfiles, FileSelection *sel) { - /* border select before the first file */ + /* box select before the first file */ if ( (sel->first < 0) && (sel->last >= 0) ) { sel->first = 0; } @@ -338,7 +338,7 @@ static FileSelect file_select(bContext *C, const rcti *rect, FileSelType select, return retval; } -static int file_border_select_find_last_selected( +static int file_box_select_find_last_selected( SpaceFile *sfile, ARegion *ar, const FileSelection *sel, const int mouse_xy[2]) { @@ -371,7 +371,7 @@ static int file_border_select_find_last_selected( return (dist_first < dist_last) ? sel->first : sel->last; } -static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent *event) +static int file_box_select_modal(bContext *C, wmOperator *op, const wmEvent *event) { ARegion *ar = CTX_wm_region(C); SpaceFile *sfile = CTX_wm_space_file(C); @@ -381,7 +381,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * int result; - result = WM_gesture_border_modal(C, op, event); + result = WM_gesture_box_modal(C, op, event); if (result == OPERATOR_RUNNING_MODAL) { WM_operator_properties_border_to_rcti(op, &rect); @@ -399,7 +399,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * for (idx = sel.last; idx >= 0; idx--) { const FileDirEntry *file = filelist_file(sfile->files, idx); - /* dont highlight readonly file (".." or ".") on border select */ + /* dont highlight readonly file (".." or ".") on box select */ if (FILENAME_IS_CURRPAR(file->relpath)) { filelist_entry_select_set(sfile->files, file, FILE_SEL_REMOVE, FILE_SEL_HIGHLIGHTED, CHECK_ALL); } @@ -411,7 +411,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * } } params->sel_first = sel.first; params->sel_last = sel.last; - params->active_file = file_border_select_find_last_selected(sfile, ar, &sel, event->mval); + params->active_file = file_box_select_find_last_selected(sfile, ar, &sel, event->mval); } else { params->highlight_file = -1; @@ -424,7 +424,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * return result; } -static int file_border_select_exec(bContext *C, wmOperator *op) +static int file_box_select_exec(bContext *C, wmOperator *op) { ARegion *ar = CTX_wm_region(C); SpaceFile *sfile = CTX_wm_space_file(C); @@ -455,22 +455,22 @@ static int file_border_select_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FILE_OT_select_border(wmOperatorType *ot) +void FILE_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; + ot->name = "Box Select"; ot->description = "Activate/select the file(s) contained in the border"; - ot->idname = "FILE_OT_select_border"; + ot->idname = "FILE_OT_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = file_border_select_exec; - ot->modal = file_border_select_modal; + ot->invoke = WM_gesture_box_invoke; + ot->exec = file_box_select_exec; + ot->modal = file_box_select_modal; ot->poll = ED_operator_file_active; - ot->cancel = WM_gesture_border_cancel; + ot->cancel = WM_gesture_box_cancel; /* properties */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } static int file_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index f05c18d31d5..4b02c5be2f0 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -462,7 +462,7 @@ static void file_operatortypes(void) WM_operatortype_append(FILE_OT_select); WM_operatortype_append(FILE_OT_select_walk); WM_operatortype_append(FILE_OT_select_all); - WM_operatortype_append(FILE_OT_select_border); + WM_operatortype_append(FILE_OT_select_box); WM_operatortype_append(FILE_OT_select_bookmark); WM_operatortype_append(FILE_OT_highlight); WM_operatortype_append(FILE_OT_execute); @@ -588,8 +588,8 @@ static void file_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "FILE_OT_next", BUTTON5MOUSE, KM_CLICK, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_select_all", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "FILE_OT_select_border", BKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "FILE_OT_select_border", EVT_TWEAK_L, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_select_box", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_select_box", EVT_TWEAK_L, KM_ANY, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "FILE_OT_highlight", MOUSEMOVE, KM_ANY, KM_ANY, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index 398561927dd..286d3cea59c 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -59,7 +59,7 @@ void graph_draw_ghost_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, str void deselect_graph_keys(struct bAnimContext *ac, bool test, short sel, bool do_channels); void GRAPH_OT_select_all(struct wmOperatorType *ot); -void GRAPH_OT_select_border(struct wmOperatorType *ot); +void GRAPH_OT_select_box(struct wmOperatorType *ot); void GRAPH_OT_select_lasso(struct wmOperatorType *ot); void GRAPH_OT_select_circle(struct wmOperatorType *ot); void GRAPH_OT_select_column(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 99d7f8c72e2..b3a72066b79 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -431,7 +431,7 @@ void graphedit_operatortypes(void) /* selection */ WM_operatortype_append(GRAPH_OT_clickselect); WM_operatortype_append(GRAPH_OT_select_all); - WM_operatortype_append(GRAPH_OT_select_border); + WM_operatortype_append(GRAPH_OT_select_box); WM_operatortype_append(GRAPH_OT_select_lasso); WM_operatortype_append(GRAPH_OT_select_circle); WM_operatortype_append(GRAPH_OT_select_column); @@ -555,18 +555,18 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap) /* deselect all */ ED_keymap_template_select_all(keymap, "GRAPH_OT_select_all"); - /* borderselect */ - kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0); + /* box_select */ + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_box", BKEY, KM_PRESS, 0, 0); RNA_boolean_set(kmi->ptr, "axis_range", false); RNA_boolean_set(kmi->ptr, "include_handles", false); - kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_box", BKEY, KM_PRESS, KM_ALT, 0); RNA_boolean_set(kmi->ptr, "axis_range", true); RNA_boolean_set(kmi->ptr, "include_handles", false); - kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_box", BKEY, KM_PRESS, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "axis_range", false); RNA_boolean_set(kmi->ptr, "include_handles", true); - kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_box", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "axis_range", true); RNA_boolean_set(kmi->ptr, "include_handles", true); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 3b2ff4266b7..ffbde1e9aab 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -219,7 +219,7 @@ void GRAPH_OT_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } -/* ******************** Border Select Operator **************************** */ +/* ******************** Box Select Operator **************************** */ /* This operator currently works in one of three ways: * -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION) * -> ALT-BKEY - depending on which axis of the region was larger... @@ -229,12 +229,12 @@ void GRAPH_OT_select_all(wmOperatorType *ot) * The selection backend is also reused for the Lasso and Circle select operators. */ -/* Borderselect only selects keyframes now, as overshooting handles often get caught too, +/* Box Select only selects keyframes now, as overshooting handles often get caught too, * which means that they may be inadvertently moved as well. However, incl_handles overrides * this, and allow handles to be considered independently too. * Also, for convenience, handles should get same status as keyframe (if it was within bounds). */ -static void borderselect_graphkeys( +static void box_select_graphkeys( bAnimContext *ac, const rctf *rectf_view, short mode, short selectmode, bool incl_handles, void *data) { @@ -285,7 +285,7 @@ static void borderselect_graphkeys( mapping_flag |= ANIM_get_normalization_flags(ac); - /* loop over data, doing border select */ + /* loop over data, doing box select */ for (ale = anim_data.first; ale; ale = ale->next) { AnimData *adt = ANIM_nla_mapping_get(ac, ale); FCurve *fcu = (FCurve *)ale->key_data; @@ -340,7 +340,7 @@ static void borderselect_graphkeys( /* ------------------- */ -static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) +static int graphkeys_box_select_exec(bContext *C, wmOperator *op) { bAnimContext ac; rcti rect; @@ -374,7 +374,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) /* get settings from operator */ WM_operator_properties_border_to_rcti(op, &rect); - /* selection 'mode' depends on whether borderselect region only matters on one axis */ + /* selection 'mode' depends on whether box_select region only matters on one axis */ if (RNA_boolean_get(op->ptr, "axis_range")) { /* mode depends on which axis of the range is larger to determine which axis to use * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size @@ -391,8 +391,8 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) BLI_rctf_rcti_copy(&rect_fl, &rect); - /* apply borderselect action */ - borderselect_graphkeys(&ac, &rect_fl, mode, selectmode, incl_handles, NULL); + /* apply box_select action */ + box_select_graphkeys(&ac, &rect_fl, mode, selectmode, incl_handles, NULL); /* send notifier that keyframe selection has changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); @@ -400,18 +400,18 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void GRAPH_OT_select_border(wmOperatorType *ot) +void GRAPH_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "GRAPH_OT_select_border"; + ot->name = "Box Select"; + ot->idname = "GRAPH_OT_select_box"; ot->description = "Select all keyframes within the specified region"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = graphkeys_borderselect_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = graphkeys_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = graphop_visible_keyframes_poll; @@ -419,7 +419,7 @@ void GRAPH_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria"); @@ -474,8 +474,8 @@ static int graphkeys_lassoselect_exec(bContext *C, wmOperator *op) BLI_lasso_boundbox(&rect, data_lasso.mcords, data_lasso.mcords_tot); BLI_rctf_rcti_copy(&rect_fl, &rect); - /* apply borderselect action */ - borderselect_graphkeys(&ac, &rect_fl, BEZT_OK_REGION_LASSO, selectmode, incl_handles, &data_lasso); + /* apply box_select action */ + box_select_graphkeys(&ac, &rect_fl, BEZT_OK_REGION_LASSO, selectmode, incl_handles, &data_lasso); MEM_freeN((void *)data_lasso.mcords); @@ -547,8 +547,8 @@ static int graph_circle_select_exec(bContext *C, wmOperator *op) } } - /* apply borderselect action */ - borderselect_graphkeys(&ac, &rect_fl, BEZT_OK_REGION_CIRCLE, selectmode, incl_handles, &data); + /* apply box_select action */ + box_select_graphkeys(&ac, &rect_fl, BEZT_OK_REGION_CIRCLE, selectmode, incl_handles, &data); /* send notifier that keyframe selection has changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 07ef7a4db0d..ba984c33e47 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1040,15 +1040,15 @@ void IMAGE_OT_view_zoom_border(wmOperatorType *ot) ot->idname = "IMAGE_OT_view_zoom_border"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = image_view_zoom_border_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = space_image_main_region_poll; /* rna */ - WM_operator_properties_gesture_border_zoom(ot); + WM_operator_properties_gesture_box_zoom(ot); } /**************** load/replace/save callbacks ******************/ @@ -3769,10 +3769,10 @@ void IMAGE_OT_render_border(wmOperatorType *ot) ot->idname = "IMAGE_OT_render_border"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = render_border_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = image_cycle_render_slot_poll; /* flags */ diff --git a/source/blender/editors/space_info/info_intern.h b/source/blender/editors/space_info/info_intern.h index a16acd665b4..37d3c73f705 100644 --- a/source/blender/editors/space_info/info_intern.h +++ b/source/blender/editors/space_info/info_intern.h @@ -61,7 +61,7 @@ void info_textview_main(struct SpaceInfo *sinfo, struct ARegion *ar, struct Repo int info_report_mask(struct SpaceInfo *sinfo); void INFO_OT_select_pick(struct wmOperatorType *ot); /* report selection */ void INFO_OT_select_all_toggle(struct wmOperatorType *ot); -void INFO_OT_select_border(struct wmOperatorType *ot); +void INFO_OT_select_box(struct wmOperatorType *ot); void INFO_OT_report_replay(struct wmOperatorType *ot); void INFO_OT_report_delete(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index a6b3dad239c..d512ac8b32b 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -212,8 +212,8 @@ void INFO_OT_select_all_toggle(wmOperatorType *ot) /* properties */ } -/* borderselect operator */ -static int borderselect_exec(bContext *C, wmOperator *op) +/* box_select operator */ +static int box_select_exec(bContext *C, wmOperator *op) { SpaceInfo *sinfo = CTX_wm_space_info(C); ARegion *ar = CTX_wm_region(C); @@ -286,19 +286,19 @@ static int borderselect_exec(bContext *C, wmOperator *op) } -/* ****** Border Select ****** */ -void INFO_OT_select_border(wmOperatorType *ot) +/* ****** Box Select ****** */ +void INFO_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->description = "Toggle border selection"; - ot->idname = "INFO_OT_select_border"; + ot->name = "Box Select"; + ot->description = "Toggle box selection"; + ot->idname = "INFO_OT_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = borderselect_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_info_active; @@ -306,7 +306,7 @@ void INFO_OT_select_border(wmOperatorType *ot) /* ot->flag = OPTYPE_REGISTER; */ /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index abc953507e0..a43b5ae1760 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -198,7 +198,7 @@ static void info_operatortypes(void) /* info_report.c */ WM_operatortype_append(INFO_OT_select_pick); WM_operatortype_append(INFO_OT_select_all_toggle); - WM_operatortype_append(INFO_OT_select_border); + WM_operatortype_append(INFO_OT_select_box); WM_operatortype_append(INFO_OT_report_replay); WM_operatortype_append(INFO_OT_report_delete); @@ -218,7 +218,7 @@ static void info_keymap(struct wmKeyConfig *keyconf) /* report selection */ WM_keymap_add_item(keymap, "INFO_OT_select_pick", SELECTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "INFO_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "INFO_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "INFO_OT_select_box", BKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "INFO_OT_report_replay", RKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h index e59395cac6b..59844f31447 100644 --- a/source/blender/editors/space_nla/nla_intern.h +++ b/source/blender/editors/space_nla/nla_intern.h @@ -66,7 +66,7 @@ enum eNlaEdit_LeftRightSelect_Mode { /* --- */ void NLA_OT_select_all(wmOperatorType *ot); -void NLA_OT_select_border(wmOperatorType *ot); +void NLA_OT_select_box(wmOperatorType *ot); void NLA_OT_select_leftright(wmOperatorType *ot); void NLA_OT_click_select(wmOperatorType *ot); diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 05ca148bf5d..46c682170cd 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -125,7 +125,7 @@ void nla_operatortypes(void) /* select */ WM_operatortype_append(NLA_OT_click_select); - WM_operatortype_append(NLA_OT_select_border); + WM_operatortype_append(NLA_OT_select_box); WM_operatortype_append(NLA_OT_select_all); WM_operatortype_append(NLA_OT_select_leftright); @@ -228,10 +228,10 @@ static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap) /* deselect all */ ED_keymap_template_select_all(keymap, "NLA_OT_select_all"); - /* borderselect */ - kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0); + /* box_select */ + kmi = WM_keymap_add_item(keymap, "NLA_OT_select_box", BKEY, KM_PRESS, 0, 0); RNA_boolean_set(kmi->ptr, "axis_range", false); - kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "NLA_OT_select_box", BKEY, KM_PRESS, KM_ALT, 0); RNA_boolean_set(kmi->ptr, "axis_range", true); /* view ---------------------------------------------------- */ diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 1ce5d0c4859..0df5df2f31d 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -211,7 +211,7 @@ void NLA_OT_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } -/* ******************** Border Select Operator **************************** */ +/* ******************** Box Select Operator **************************** */ /* This operator currently works in one of three ways: * -> BKEY - 1) all strips within region are selected (NLAEDIT_BORDERSEL_ALLSTRIPS) * -> ALT-BKEY - depending on which axis of the region was larger... @@ -219,15 +219,15 @@ void NLA_OT_select_all(wmOperatorType *ot) * -> 3) y-axis, so select all frames within channels that region included (NLAEDIT_BORDERSEL_CHANNELS) */ -/* defines for borderselect mode */ +/* defines for box_select mode */ enum { - NLA_BORDERSEL_ALLSTRIPS = 0, - NLA_BORDERSEL_FRAMERANGE, - NLA_BORDERSEL_CHANNELS, -} /* eNLAEDIT_BorderSelect_Mode */; + NLA_BOXSEL_ALLSTRIPS = 0, + NLA_BOXSEL_FRAMERANGE, + NLA_BOXSEL_CHANNELS, +} /* eNLAEDIT_BoxSelect_Mode */; -static void borderselect_nla_strips(bAnimContext *ac, rcti rect, short mode, short selectmode) +static void box_select_nla_strips(bAnimContext *ac, rcti rect, short mode, short selectmode) { ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; @@ -249,12 +249,12 @@ static void borderselect_nla_strips(bAnimContext *ac, rcti rect, short mode, sho /* convert selection modes to selection modes */ selectmode = selmodes_to_flagmodes(selectmode); - /* loop over data, doing border select */ + /* loop over data, doing box select */ for (ale = anim_data.first; ale; ale = ale->next) { ymin = ymax - NLACHANNEL_STEP(snla); /* perform vertical suitability check (if applicable) */ - if ((mode == NLA_BORDERSEL_FRAMERANGE) || + if ((mode == NLA_BOXSEL_FRAMERANGE) || !((ymax < rectf.ymin) || (ymin > rectf.ymax))) { /* loop over data selecting (only if NLA-Track) */ @@ -264,7 +264,7 @@ static void borderselect_nla_strips(bAnimContext *ac, rcti rect, short mode, sho /* only select strips if they fall within the required ranges (if applicable) */ for (strip = nlt->strips.first; strip; strip = strip->next) { - if ((mode == NLA_BORDERSEL_CHANNELS) || + if ((mode == NLA_BOXSEL_CHANNELS) || BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax)) { /* set selection */ @@ -287,7 +287,7 @@ static void borderselect_nla_strips(bAnimContext *ac, rcti rect, short mode, sho /* ------------------- */ -static int nlaedit_borderselect_exec(bContext *C, wmOperator *op) +static int nlaedit_box_select_exec(bContext *C, wmOperator *op) { bAnimContext ac; rcti rect; @@ -314,7 +314,7 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op) selectmode = SELECT_SUBTRACT; } - /* selection 'mode' depends on whether borderselect region only matters on one axis */ + /* selection 'mode' depends on whether box_select region only matters on one axis */ if (RNA_boolean_get(op->ptr, "axis_range")) { /* mode depends on which axis of the range is larger to determine which axis to use * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size @@ -322,15 +322,15 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op) * used for tweaking timing when "blocking", while channels is not that useful... */ if (BLI_rcti_size_x(&rect) >= BLI_rcti_size_y(&rect)) - mode = NLA_BORDERSEL_FRAMERANGE; + mode = NLA_BOXSEL_FRAMERANGE; else - mode = NLA_BORDERSEL_CHANNELS; + mode = NLA_BOXSEL_CHANNELS; } else - mode = NLA_BORDERSEL_ALLSTRIPS; + mode = NLA_BOXSEL_ALLSTRIPS; - /* apply borderselect action */ - borderselect_nla_strips(&ac, rect, mode, selectmode); + /* apply box_select action */ + box_select_nla_strips(&ac, rect, mode, selectmode); /* set notifier that things have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_SELECTED, NULL); @@ -338,18 +338,18 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void NLA_OT_select_border(wmOperatorType *ot) +void NLA_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "NLA_OT_select_border"; + ot->name = "Box Select"; + ot->idname = "NLA_OT_select_box"; ot->description = "Use box selection to grab NLA-Strips"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = nlaedit_borderselect_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = nlaedit_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = nlaop_poll_tweakmode_off; @@ -357,7 +357,7 @@ void NLA_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index e7316604166..aca87261da8 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -2509,17 +2509,17 @@ void NODE_OT_viewer_border(wmOperatorType *ot) ot->idname = "NODE_OT_viewer_border"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = viewer_border_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = composite_node_active; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } static int clear_viewer_border_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 3644c8d09e6..3407c17bc67 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -111,7 +111,7 @@ void NODE_OT_select(struct wmOperatorType *ot); void NODE_OT_select_all(struct wmOperatorType *ot); void NODE_OT_select_linked_to(struct wmOperatorType *ot); void NODE_OT_select_linked_from(struct wmOperatorType *ot); -void NODE_OT_select_border(struct wmOperatorType *ot); +void NODE_OT_select_box(struct wmOperatorType *ot); void NODE_OT_select_circle(struct wmOperatorType *ot); void NODE_OT_select_lasso(struct wmOperatorType *ot); void NODE_OT_select_grouped(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index 9e66d1424db..a996c6835f1 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -57,7 +57,7 @@ void node_operatortypes(void) WM_operatortype_append(NODE_OT_select_all); WM_operatortype_append(NODE_OT_select_linked_to); WM_operatortype_append(NODE_OT_select_linked_from); - WM_operatortype_append(NODE_OT_select_border); + WM_operatortype_append(NODE_OT_select_box); WM_operatortype_append(NODE_OT_select_circle); WM_operatortype_append(NODE_OT_select_lasso); WM_operatortype_append(NODE_OT_select_grouped); @@ -249,7 +249,7 @@ void node_keymap(struct wmKeyConfig *keyconf) node_select_keymap(keymap, false); node_select_keymap(keymap, true); - kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0); + kmi = WM_keymap_add_item(keymap, "NODE_OT_select_box", EVT_TWEAK_S, KM_ANY, 0, 0); RNA_boolean_set(kmi->ptr, "tweak", true); kmi = WM_keymap_add_item(keymap, "NODE_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0); @@ -306,7 +306,7 @@ void node_keymap(struct wmKeyConfig *keyconf) #endif WM_keymap_add_item(keymap, "NODE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); - kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, "NODE_OT_select_box", BKEY, KM_PRESS, 0, 0); RNA_boolean_set(kmi->ptr, "tweak", false); WM_keymap_add_item(keymap, "NODE_OT_delete", XKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 6d88b4eef4d..eb233f3fea1 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -517,9 +517,9 @@ void NODE_OT_select(wmOperatorType *ot) RNA_def_boolean(ot->srna, "extend", 0, "Extend", ""); } -/* ****** Border Select ****** */ +/* ****** Box Select ****** */ -static int node_borderselect_exec(bContext *C, wmOperator *op) +static int node_box_select_exec(bContext *C, wmOperator *op) { SpaceNode *snode = CTX_wm_space_node(C); ARegion *ar = CTX_wm_region(C); @@ -555,13 +555,13 @@ static int node_borderselect_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int node_border_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) +static int node_box_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) { const bool tweak = RNA_boolean_get(op->ptr, "tweak"); if (tweak) { - /* prevent initiating the border select if the mouse is over a node */ - /* this allows border select on empty space, but drag-translate on nodes */ + /* prevent initiating the box select if the mouse is over a node */ + /* this allows box select on empty space, but drag-translate on nodes */ SpaceNode *snode = CTX_wm_space_node(C); ARegion *ar = CTX_wm_region(C); float mx, my; @@ -572,21 +572,21 @@ static int node_border_select_invoke(bContext *C, wmOperator *op, const wmEvent return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } - return WM_gesture_border_invoke(C, op, event); + return WM_gesture_box_invoke(C, op, event); } -void NODE_OT_select_border(wmOperatorType *ot) +void NODE_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "NODE_OT_select_border"; + ot->name = "Box Select"; + ot->idname = "NODE_OT_select_box"; ot->description = "Use box selection to select nodes"; /* api callbacks */ - ot->invoke = node_border_select_invoke; - ot->exec = node_borderselect_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = node_box_select_invoke; + ot->exec = node_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_node_active; @@ -594,7 +594,7 @@ void NODE_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); RNA_def_boolean(ot->srna, "tweak", 0, "Tweak", "Only activate when mouse is not over a node - useful for tweak gesture"); } diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 9d25987f494..310c8071097 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -293,7 +293,7 @@ void OUTLINER_OT_show_one_level(struct wmOperatorType *ot); void OUTLINER_OT_show_active(struct wmOperatorType *ot); void OUTLINER_OT_show_hierarchy(struct wmOperatorType *ot); -void OUTLINER_OT_select_border(struct wmOperatorType *ot); +void OUTLINER_OT_select_box(struct wmOperatorType *ot); void OUTLINER_OT_select_all(struct wmOperatorType *ot); void OUTLINER_OT_expanded_toggle(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 7e8954ad0d1..2794c79eeb2 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -63,7 +63,7 @@ void outliner_operatortypes(void) { WM_operatortype_append(OUTLINER_OT_highlight_update); WM_operatortype_append(OUTLINER_OT_item_activate); - WM_operatortype_append(OUTLINER_OT_select_border); + WM_operatortype_append(OUTLINER_OT_select_box); WM_operatortype_append(OUTLINER_OT_item_openclose); WM_operatortype_append(OUTLINER_OT_item_rename); WM_operatortype_append(OUTLINER_OT_item_drag_drop); @@ -145,7 +145,7 @@ void outliner_keymap(wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "extend", true); - WM_keymap_add_item(keymap, "OUTLINER_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "OUTLINER_OT_select_box", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, 0, 0); RNA_boolean_set(kmi->ptr, "all", false); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index d1d97e37b59..efe27b5be89 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1187,8 +1187,8 @@ void OUTLINER_OT_item_activate(wmOperatorType *ot) /* ****************************************************** */ -/* **************** Border Select Tool ****************** */ -static void outliner_item_border_select(Scene *scene, rctf *rectf, TreeElement *te, bool select) +/* **************** Box Select Tool ****************** */ +static void outliner_item_box_select(Scene *scene, rctf *rectf, TreeElement *te, bool select) { TreeStoreElem *tselem = TREESTORE(te); @@ -1204,12 +1204,12 @@ static void outliner_item_border_select(Scene *scene, rctf *rectf, TreeElement * /* Look at its children. */ if ((tselem->flag & TSE_CLOSED) == 0) { for (te = te->subtree.first; te; te = te->next) { - outliner_item_border_select(scene, rectf, te, select); + outliner_item_box_select(scene, rectf, te, select); } } } -static int outliner_border_select_exec(bContext *C, wmOperator *op) +static int outliner_box_select_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); SpaceOops *soops = CTX_wm_space_outliner(C); @@ -1222,7 +1222,7 @@ static int outliner_border_select_exec(bContext *C, wmOperator *op) UI_view2d_region_to_view_rctf(&ar->v2d, &rectf, &rectf); for (te = soops->tree.first; te; te = te->next) { - outliner_item_border_select(scene, &rectf, te, select); + outliner_item_box_select(scene, &rectf, te, select); } DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE); @@ -1232,18 +1232,18 @@ static int outliner_border_select_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void OUTLINER_OT_select_border(wmOperatorType *ot) +void OUTLINER_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "OUTLINER_OT_select_border"; + ot->name = "Box Select"; + ot->idname = "OUTLINER_OT_select_box"; ot->description = "Use box selection to select tree elements"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = outliner_border_select_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = outliner_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_outliner_active; @@ -1251,7 +1251,7 @@ void OUTLINER_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_ex(ot, true, false); + WM_operator_properties_gesture_box_ex(ot, true, false); } /* ****************************************************** */ diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 2ffc3971e18..38abfe909a6 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -3401,7 +3401,7 @@ void SEQUENCER_OT_swap_data(wmOperatorType *ot) /* properties */ } -/* borderselect operator */ +/* box select operator */ static int view_ghost_border_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); @@ -3436,7 +3436,7 @@ static int view_ghost_border_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -/* ****** Border Select ****** */ +/* ****** Box Select ****** */ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot) { /* identifiers */ @@ -3445,17 +3445,17 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot) ot->description = "Set the boundaries of the border used for offset-view"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = view_ghost_border_exec; - ot->modal = WM_gesture_border_modal; + ot->modal = WM_gesture_box_modal; ot->poll = sequencer_view_preview_poll; - ot->cancel = WM_gesture_border_cancel; + ot->cancel = WM_gesture_box_cancel; /* flags */ ot->flag = 0; /* rna */ - WM_operator_properties_gesture_border(ot); + WM_operator_properties_gesture_box(ot); } /* rebuild_proxy operator */ diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index ef1559ca940..0d647c883be 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -148,7 +148,7 @@ void SEQUENCER_OT_select_linked(struct wmOperatorType *ot); void SEQUENCER_OT_select_linked_pick(struct wmOperatorType *ot); void SEQUENCER_OT_select_handles(struct wmOperatorType *ot); void SEQUENCER_OT_select_active_side(struct wmOperatorType *ot); -void SEQUENCER_OT_select_border(struct wmOperatorType *ot); +void SEQUENCER_OT_select_box(struct wmOperatorType *ot); void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot); void SEQUENCER_OT_select_grouped(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 61b6a6dc515..2b84466a353 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -107,7 +107,7 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_select_linked); WM_operatortype_append(SEQUENCER_OT_select_handles); WM_operatortype_append(SEQUENCER_OT_select_active_side); - WM_operatortype_append(SEQUENCER_OT_select_border); + WM_operatortype_append(SEQUENCER_OT_select_box); WM_operatortype_append(SEQUENCER_OT_select_grouped); /* sequencer_add.c */ @@ -318,7 +318,7 @@ void sequencer_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "SEQUENCER_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "SEQUENCER_OT_select_box", BKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 5b5f41ccb32..5fbe134b301 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -881,8 +881,8 @@ void SEQUENCER_OT_select_active_side(wmOperatorType *ot) } -/* borderselect operator */ -static int sequencer_borderselect_exec(bContext *C, wmOperator *op) +/* box_select operator */ +static int sequencer_box_select_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); @@ -919,19 +919,19 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) } -/* ****** Border Select ****** */ -void SEQUENCER_OT_select_border(wmOperatorType *ot) +/* ****** Box Select ****** */ +void SEQUENCER_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->idname = "SEQUENCER_OT_select_border"; - ot->description = "Select strips using border selection"; + ot->name = "Box Select"; + ot->idname = "SEQUENCER_OT_select_box"; + ot->description = "Select strips using box selection"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = sequencer_borderselect_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->invoke = WM_gesture_box_invoke; + ot->exec = sequencer_box_select_exec; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_sequencer_active; @@ -939,7 +939,7 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } /* ****** Selected Grouped ****** */ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 732ee302ac5..e710d7b2d2a 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3230,7 +3230,7 @@ static int render_border_exec(bContext *C, wmOperator *op) rcti rect; rctf vb, border; - /* get border select values using rna */ + /* get box select values using rna */ WM_operator_properties_border_to_rcti(op, &rect); /* calculate range */ @@ -3296,10 +3296,10 @@ void VIEW3D_OT_render_border(wmOperatorType *ot) ot->idname = "VIEW3D_OT_render_border"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = render_border_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_view3d_active; @@ -3392,7 +3392,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) /* note; otherwise opengl won't work */ view3d_operator_needs_opengl(C); - /* get border select values using rna */ + /* get box select values using rna */ WM_operator_properties_border_to_rcti(op, &rect); /* check if zooming in/out view */ @@ -3514,10 +3514,10 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot) ot->idname = "VIEW3D_OT_zoom_border"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; + ot->invoke = WM_gesture_box_invoke; ot->exec = view3d_zoom_border_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_region_view3d_active; @@ -3525,7 +3525,7 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot) ot->flag = 0; /* properties */ - WM_operator_properties_gesture_border_zoom(ot); + WM_operator_properties_gesture_box_zoom(ot); } /** \} */ @@ -4588,7 +4588,7 @@ static int view3d_clipping_invoke(bContext *C, wmOperator *op, const wmEvent *ev return OPERATOR_FINISHED; } else { - return WM_gesture_border_invoke(C, op, event); + return WM_gesture_box_invoke(C, op, event); } } @@ -4603,8 +4603,8 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) /* api callbacks */ ot->invoke = view3d_clipping_invoke; ot->exec = view3d_clipping_exec; - ot->modal = WM_gesture_border_modal; - ot->cancel = WM_gesture_border_cancel; + ot->modal = WM_gesture_box_modal; + ot->cancel = WM_gesture_box_cancel; ot->poll = ED_operator_region_view3d_active; diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index b8edbfe9b65..99132820b20 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -166,7 +166,7 @@ float view3d_depth_near(struct ViewDepths *d); /* view3d_select.c */ void VIEW3D_OT_select(struct wmOperatorType *ot); void VIEW3D_OT_select_circle(struct wmOperatorType *ot); -void VIEW3D_OT_select_border(struct wmOperatorType *ot); +void VIEW3D_OT_select_box(struct wmOperatorType *ot); void VIEW3D_OT_select_lasso(struct wmOperatorType *ot); void VIEW3D_OT_select_menu(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 6635b02a6c7..9ed59759e4d 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -191,7 +191,7 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_view_center_camera); WM_operatortype_append(VIEW3D_OT_view_center_lock); WM_operatortype_append(VIEW3D_OT_select); - WM_operatortype_append(VIEW3D_OT_select_border); + WM_operatortype_append(VIEW3D_OT_select_box); WM_operatortype_append(VIEW3D_OT_clip_border); WM_operatortype_append(VIEW3D_OT_select_circle); WM_operatortype_append(VIEW3D_OT_smoothview); @@ -484,7 +484,7 @@ void view3d_keymap(wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "object", false); RNA_boolean_set(kmi->ptr, "enumerate", true); - WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW3D_OT_select_box", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "mode", SEL_OP_ADD); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index a3bd31423e8..26a9a8f24c1 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -311,7 +311,7 @@ static bool view3d_selectable_data(bContext *C) } -/* helper also for borderselect */ +/* helper also for box_select */ static bool edge_fully_inside_rect(const rctf *rect, const float v1[2], const float v2[2]) { return BLI_rctf_isect_pt_v(rect, v1) && BLI_rctf_isect_pt_v(rect, v2); @@ -448,7 +448,7 @@ static void do_lasso_select_objects( /** - * Use for lasso & border select. + * Use for lasso & box select. */ static Base **do_pose_tag_select_op_prepare(ViewContext *vc, uint *r_bases_len) { @@ -2472,7 +2472,7 @@ static int do_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, const eS return hits > 0 ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } -static int view3d_borderselect_exec(bContext *C, wmOperator *op) +static int view3d_box_select_exec(bContext *C, wmOperator *op) { ViewContext vc; rcti rect; @@ -2530,7 +2530,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) } break; default: - assert(!"border select on incorrect object type"); + assert(!"box select on incorrect object type"); break; } } @@ -2548,7 +2548,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) ret |= do_paintvert_box_select(&vc, &rect, sel_op); } else if (vc.obact && vc.obact->mode & OB_MODE_PARTICLE_EDIT) { - ret |= PE_border_select(C, &rect, sel_op); + ret |= PE_box_select(C, &rect, sel_op); } else if (vc.obact && vc.obact->mode & OB_MODE_POSE) { ret |= do_pose_box_select(C, &vc, &rect, sel_op); @@ -2571,26 +2571,26 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) /* *****************Selection Operators******************* */ -/* ****** Border Select ****** */ -void VIEW3D_OT_select_border(wmOperatorType *ot) +/* ****** Box Select ****** */ +void VIEW3D_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->description = "Select items using border selection"; - ot->idname = "VIEW3D_OT_select_border"; + ot->name = "Box Select"; + ot->description = "Select items using box selection"; + ot->idname = "VIEW3D_OT_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = view3d_borderselect_exec; - ot->modal = WM_gesture_border_modal; + ot->invoke = WM_gesture_box_invoke; + ot->exec = view3d_box_select_exec; + ot->modal = WM_gesture_box_modal; ot->poll = view3d_selectable_data; - ot->cancel = WM_gesture_border_cancel; + ot->cancel = WM_gesture_box_cancel; /* flags */ ot->flag = OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border(ot); + WM_operator_properties_gesture_box(ot); WM_operator_properties_select_operation(ot); } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 67cbc1e99b9..33a3cd8e151 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -930,7 +930,7 @@ int view3d_opengl_select( char gpu_select_mode; - /* case not a border select */ + /* case not a box select */ if (input->xmin == input->xmax) { /* seems to be default value for bones only now */ BLI_rcti_init_pt_radius(&rect, (const int[2]){input->xmin, input->ymin}, 12); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 92c38567354..f4fc6f35467 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -3167,10 +3167,10 @@ static void uv_select_flush_from_tag_loop(SpaceImage *sima, Scene *scene, Object /** \} */ /* -------------------------------------------------------------------- */ -/** \name Border Select Operator +/** \name Box Select Operator * \{ */ -static int uv_border_select_exec(bContext *C, wmOperator *op) +static int uv_box_select_exec(bContext *C, wmOperator *op) { Depsgraph *depsgraph = CTX_data_depsgraph(C); SpaceImage *sima = CTX_wm_space_image(C); @@ -3287,19 +3287,19 @@ static int uv_border_select_exec(bContext *C, wmOperator *op) return changed_multi ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } -static void UV_OT_select_border(wmOperatorType *ot) +static void UV_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; - ot->description = "Select UV vertices using border selection"; - ot->idname = "UV_OT_select_border"; + ot->name = "Box Select"; + ot->description = "Select UV vertices using box selection"; + ot->idname = "UV_OT_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = uv_border_select_exec; - ot->modal = WM_gesture_border_modal; + ot->invoke = WM_gesture_box_invoke; + ot->exec = uv_box_select_exec; + ot->modal = WM_gesture_box_modal; ot->poll = ED_operator_uvedit_space_image; /* requires space image */; - ot->cancel = WM_gesture_border_cancel; + ot->cancel = WM_gesture_box_cancel; /* flags */ ot->flag = OPTYPE_UNDO; @@ -3307,7 +3307,7 @@ static void UV_OT_select_border(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only"); - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } /** \} */ @@ -4657,7 +4657,7 @@ void ED_operatortypes_uvedit(void) WM_operatortype_append(UV_OT_select_linked_pick); WM_operatortype_append(UV_OT_select_split); WM_operatortype_append(UV_OT_select_pinned); - WM_operatortype_append(UV_OT_select_border); + WM_operatortype_append(UV_OT_select_box); WM_operatortype_append(UV_OT_select_lasso); WM_operatortype_append(UV_OT_select_circle); WM_operatortype_append(UV_OT_select_more); @@ -4728,10 +4728,10 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "extend", true); WM_keymap_add_item(keymap, "UV_OT_select_split", YKEY, KM_PRESS, 0, 0); - /* border/circle selection */ - kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, 0, 0); + /* box/circle selection */ + kmi = WM_keymap_add_item(keymap, "UV_OT_select_box", BKEY, KM_PRESS, 0, 0); RNA_boolean_set(kmi->ptr, "pinned", false); - kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "UV_OT_select_box", BKEY, KM_PRESS, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "pinned", true); WM_keymap_add_item(keymap, "UV_OT_select_circle", CKEY, KM_PRESS, 0, 0); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 11d56206d6e..08da013754b 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3505,7 +3505,7 @@ void rna_def_freestyle_settings(BlenderRNA *brna) "Select silhouettes (edges at the boundary of visible and hidden faces)"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); - prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "select_box", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BORDER); RNA_def_property_ui_text(prop, "Border", "Select border edges (open mesh edges)"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 7f97831c6b7..1db4b4328e9 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -351,10 +351,10 @@ void WM_operator_properties_filesel( void WM_operator_properties_border(struct wmOperatorType *ot); void WM_operator_properties_border_to_rcti(struct wmOperator *op, struct rcti *rect); void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect); -void WM_operator_properties_gesture_border_ex(struct wmOperatorType *ot, bool deselect, bool extend); -void WM_operator_properties_gesture_border(struct wmOperatorType *ot); -void WM_operator_properties_gesture_border_select(struct wmOperatorType *ot); -void WM_operator_properties_gesture_border_zoom(struct wmOperatorType *ot); +void WM_operator_properties_gesture_box_ex(struct wmOperatorType *ot, bool deselect, bool extend); +void WM_operator_properties_gesture_box(struct wmOperatorType *ot); +void WM_operator_properties_gesture_box_select(struct wmOperatorType *ot); +void WM_operator_properties_gesture_box_zoom(struct wmOperatorType *ot); void WM_operator_properties_gesture_lasso_ex(struct wmOperatorType *ot, bool deselect, bool extend); void WM_operator_properties_gesture_lasso(struct wmOperatorType *ot); void WM_operator_properties_gesture_lasso_select(struct wmOperatorType *ot); @@ -445,9 +445,9 @@ bool WM_paneltype_add(struct PanelType *mt); void WM_paneltype_remove(struct PanelType *mt); /* wm_gesture_ops.c */ -int WM_gesture_border_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); -int WM_gesture_border_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); -void WM_gesture_border_cancel(struct bContext *C, struct wmOperator *op); +int WM_gesture_box_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_gesture_box_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +void WM_gesture_box_cancel(struct bContext *C, struct wmOperator *op); int WM_gesture_circle_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_gesture_circle_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); void WM_gesture_circle_cancel(struct bContext *C, struct wmOperator *op); diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c index a4d811bf91b..b29da15a334 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.c +++ b/source/blender/windowmanager/intern/wm_gesture_ops.c @@ -143,7 +143,7 @@ static int gesture_modal_state_from_operator(wmOperator *op) * * \{ */ -static bool gesture_border_apply_rect(wmOperator *op) +static bool gesture_box_apply_rect(wmOperator *op) { wmGesture *gesture = op->customdata; rcti *rect = gesture->customdata; @@ -161,13 +161,13 @@ static bool gesture_border_apply_rect(wmOperator *op) return 1; } -static bool gesture_border_apply(bContext *C, wmOperator *op) +static bool gesture_box_apply(bContext *C, wmOperator *op) { wmGesture *gesture = op->customdata; int retval; - if (!gesture_border_apply_rect(op)) { + if (!gesture_box_apply_rect(op)) { return 0; } @@ -179,7 +179,7 @@ static bool gesture_border_apply(bContext *C, wmOperator *op) return 1; } -int WM_gesture_border_invoke(bContext *C, wmOperator *op, const wmEvent *event) +int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event) { int modal_state = gesture_modal_state_from_operator(op); @@ -208,7 +208,7 @@ int WM_gesture_border_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } -int WM_gesture_border_modal(bContext *C, wmOperator *op, const wmEvent *event) +int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmGesture *gesture = op->customdata; rcti *rect = gesture->customdata; @@ -222,7 +222,7 @@ int WM_gesture_border_modal(bContext *C, wmOperator *op, const wmEvent *event) rect->xmax = event->x - gesture->winrct.xmin; rect->ymax = event->y - gesture->winrct.ymin; } - gesture_border_apply_rect(op); + gesture_box_apply_rect(op); wm_gesture_tag_redraw(C); } @@ -241,7 +241,7 @@ int WM_gesture_border_modal(bContext *C, wmOperator *op, const wmEvent *event) if (gesture->wait_for_input) { gesture->modal_state = event->val; } - if (gesture_border_apply(C, op)) { + if (gesture_box_apply(C, op)) { gesture_modal_end(C, op); return OPERATOR_FINISHED; } @@ -270,7 +270,7 @@ int WM_gesture_border_modal(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void WM_gesture_border_cancel(bContext *C, wmOperator *op) +void WM_gesture_box_cancel(bContext *C, wmOperator *op) { gesture_modal_end(C, op); } @@ -427,7 +427,7 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event) #if 0 /* Allow view navigation??? */ /* note, this gives issues: - * 1) other modal ops run on top (border select), + * 1) other modal ops run on top (box select), * 2) middlemouse is used now 3) tablet/trackpad? */ else { return OPERATOR_PASS_THROUGH; diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 3cc03562bdb..0c3750baa4c 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -229,9 +229,9 @@ void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect) } /** - * Use with #WM_gesture_border_invoke + * Use with #WM_gesture_box_invoke */ -void WM_operator_properties_gesture_border_ex(wmOperatorType *ot, bool deselect, bool extend) +void WM_operator_properties_gesture_box_ex(wmOperatorType *ot, bool deselect, bool extend) { PropertyRNA *prop; @@ -247,13 +247,13 @@ void WM_operator_properties_gesture_border_ex(wmOperatorType *ot, bool deselect, } } -void WM_operator_properties_gesture_border_select(wmOperatorType *ot) +void WM_operator_properties_gesture_box_select(wmOperatorType *ot) { - WM_operator_properties_gesture_border_ex(ot, true, true); + WM_operator_properties_gesture_box_ex(ot, true, true); } -void WM_operator_properties_gesture_border(wmOperatorType *ot) +void WM_operator_properties_gesture_box(wmOperatorType *ot) { - WM_operator_properties_gesture_border_ex(ot, false, false); + WM_operator_properties_gesture_box_ex(ot, false, false); } void WM_operator_properties_select_operation(wmOperatorType *ot) @@ -270,7 +270,7 @@ void WM_operator_properties_select_operation(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_SKIP_SAVE); } -void WM_operator_properties_gesture_border_zoom(wmOperatorType *ot) +void WM_operator_properties_gesture_box_zoom(wmOperatorType *ot) { WM_operator_properties_border(ot); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 21822c7c7f2..0b5fd186e7a 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3273,8 +3273,8 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf) } -/* borderselect-like modal operators */ -static void gesture_border_modal_keymap(wmKeyConfig *keyconf) +/* box_select-like modal operators */ +static void gesture_box_modal_keymap(wmKeyConfig *keyconf) { static const EnumPropertyItem modal_items[] = { {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, @@ -3284,12 +3284,12 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf) {0, NULL, 0, NULL, NULL} }; - wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Gesture Border"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Gesture Box"); /* this function is called for each spacetype, only needs to add map once */ if (keymap && keymap->modal_items) return; - keymap = WM_modalkeymap_add(keyconf, "Gesture Border", modal_items); + keymap = WM_modalkeymap_add(keyconf, "Gesture Box", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); @@ -3310,33 +3310,33 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, 0, 0, GESTURE_MODAL_DESELECT); /* assign map to operators */ - WM_modalkeymap_assign(keymap, "ACTION_OT_select_border"); - WM_modalkeymap_assign(keymap, "ANIM_OT_channels_select_border"); + WM_modalkeymap_assign(keymap, "ACTION_OT_select_box"); + WM_modalkeymap_assign(keymap, "ANIM_OT_channels_select_box"); WM_modalkeymap_assign(keymap, "ANIM_OT_previewrange_set"); - WM_modalkeymap_assign(keymap, "INFO_OT_select_border"); - WM_modalkeymap_assign(keymap, "FILE_OT_select_border"); - WM_modalkeymap_assign(keymap, "GRAPH_OT_select_border"); - WM_modalkeymap_assign(keymap, "MARKER_OT_select_border"); - WM_modalkeymap_assign(keymap, "NLA_OT_select_border"); - WM_modalkeymap_assign(keymap, "NODE_OT_select_border"); + WM_modalkeymap_assign(keymap, "INFO_OT_select_box"); + WM_modalkeymap_assign(keymap, "FILE_OT_select_box"); + WM_modalkeymap_assign(keymap, "GRAPH_OT_select_box"); + WM_modalkeymap_assign(keymap, "MARKER_OT_select_box"); + WM_modalkeymap_assign(keymap, "NLA_OT_select_box"); + WM_modalkeymap_assign(keymap, "NODE_OT_select_box"); WM_modalkeymap_assign(keymap, "NODE_OT_viewer_border"); WM_modalkeymap_assign(keymap, "PAINT_OT_hide_show"); - WM_modalkeymap_assign(keymap, "OUTLINER_OT_select_border"); -// WM_modalkeymap_assign(keymap, "SCREEN_OT_border_select"); // template - WM_modalkeymap_assign(keymap, "SEQUENCER_OT_select_border"); + WM_modalkeymap_assign(keymap, "OUTLINER_OT_select_box"); +// WM_modalkeymap_assign(keymap, "SCREEN_OT_box_select"); // template + WM_modalkeymap_assign(keymap, "SEQUENCER_OT_select_box"); WM_modalkeymap_assign(keymap, "SEQUENCER_OT_view_ghost_border"); - WM_modalkeymap_assign(keymap, "UV_OT_select_border"); - WM_modalkeymap_assign(keymap, "CLIP_OT_select_border"); - WM_modalkeymap_assign(keymap, "CLIP_OT_graph_select_border"); - WM_modalkeymap_assign(keymap, "MASK_OT_select_border"); + WM_modalkeymap_assign(keymap, "UV_OT_select_box"); + WM_modalkeymap_assign(keymap, "CLIP_OT_select_box"); + WM_modalkeymap_assign(keymap, "CLIP_OT_graph_select_box"); + WM_modalkeymap_assign(keymap, "MASK_OT_select_box"); WM_modalkeymap_assign(keymap, "VIEW2D_OT_zoom_border"); WM_modalkeymap_assign(keymap, "VIEW3D_OT_clip_border"); WM_modalkeymap_assign(keymap, "VIEW3D_OT_render_border"); - WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_border"); + WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_box"); WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom_border"); /* XXX TODO: zoom border should perhaps map rightmouse to zoom out instead of in+cancel */ WM_modalkeymap_assign(keymap, "IMAGE_OT_render_border"); WM_modalkeymap_assign(keymap, "IMAGE_OT_view_zoom_border"); - WM_modalkeymap_assign(keymap, "GPENCIL_OT_select_border"); + WM_modalkeymap_assign(keymap, "GPENCIL_OT_select_box"); } /* zoom to border modal operators */ @@ -3509,7 +3509,7 @@ void wm_window_keymap(wmKeyConfig *keyconf) wm_gizmos_keymap(keyconf); gesture_circle_modal_keymap(keyconf); - gesture_border_modal_keymap(keyconf); + gesture_box_modal_keymap(keyconf); gesture_zoom_border_modal_keymap(keyconf); gesture_straightline_modal_keymap(keyconf); } diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c index ecbcc31c56f..3a112ac0597 100644 --- a/source/blender/windowmanager/intern/wm_toolsystem.c +++ b/source/blender/windowmanager/intern/wm_toolsystem.c @@ -560,7 +560,7 @@ static const char *toolsystem_default_tool(const bToolKey *tkey) default: /* FIXME(campbell): disable for now since this means we can't lasso select by default. */ #if 0 - return "Select Border"; + return "Select Box"; #endif break; } diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 904ac2b89b3..cfb43bf43ed 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -448,7 +448,7 @@ enum { GESTURE_MODAL_CIRCLE_ADD = 6, /* circle sel: larger brush */ GESTURE_MODAL_CIRCLE_SUB = 7, /* circle sel: smaller brush */ - GESTURE_MODAL_BEGIN = 8, /* border select/straight line, activate, use release to detect which button */ + GESTURE_MODAL_BEGIN = 8, /* box select/straight line, activate, use release to detect which button */ /* Uses 'zoom_out' operator property. */ GESTURE_MODAL_IN = 9, -- cgit v1.2.3