diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-05 03:27:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-05 03:29:31 +0300 |
commit | 0b98a679bb799fe496be67d8dd52fadef3c1027a (patch) | |
tree | 83302b41f2481cf9aad168459dce08a971b9d0fb /source/blender/editors/space_graph | |
parent | 50cb8013ebf8e421a16428756dd869ab844b41f6 (diff) |
UI: rename Border Select -> Box Select
See: T56648
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_ops.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 40 |
3 files changed, 27 insertions, 27 deletions
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); |