diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-08 15:10:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-08 15:23:39 +0300 |
commit | 6f3f891c58fd1f471d8b18dac600a68141ccdd57 (patch) | |
tree | 7103f83a44153b2519f1bd8e06481855cd31522b | |
parent | 75cb4850f098cb5a1306d661477f67bca3dcd4b0 (diff) |
Rename BLI_rct*_init_pt_size -> radius
-rw-r--r-- | source/blender/blenlib/BLI_rect.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/rct.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/armature_select.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 2 | ||||
-rw-r--r-- | source/blender/editors/metaball/mball_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h index 484a679f76a..041679ef876 100644 --- a/source/blender/blenlib/BLI_rect.h +++ b/source/blender/blenlib/BLI_rect.h @@ -47,8 +47,8 @@ bool BLI_rcti_is_empty(const struct rcti *rect); bool BLI_rctf_is_empty(const struct rctf *rect); void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax); void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax); -void BLI_rctf_init_pt_size(struct rctf *rect, const float xy[2], float size); -void BLI_rcti_init_pt_size(struct rcti *rect, const int xy[2], int size); +void BLI_rctf_init_pt_radius(struct rctf *rect, const float xy[2], float size); +void BLI_rcti_init_pt_radius(struct rcti *rect, const int xy[2], int size); void BLI_rcti_init_minmax(struct rcti *rect); void BLI_rctf_init_minmax(struct rctf *rect); void BLI_rcti_do_minmax_v(struct rcti *rect, const int xy[2]); diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index e01a4714131..fd24a00156d 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -351,7 +351,7 @@ void BLI_rcti_init(rcti *rect, int xmin, int xmax, int ymin, int ymax) } } -void BLI_rctf_init_pt_size(rctf *rect, const float xy[2], float size) +void BLI_rctf_init_pt_radius(rctf *rect, const float xy[2], float size) { rect->xmin = xy[0] - size; rect->xmax = xy[0] + size; @@ -359,7 +359,7 @@ void BLI_rctf_init_pt_size(rctf *rect, const float xy[2], float size) rect->ymax = xy[1] + size; } -void BLI_rcti_init_pt_size(rcti *rect, const int xy[2], int size) +void BLI_rcti_init_pt_radius(rcti *rect, const int xy[2], int size) { rect->xmin = xy[0] - size; rect->xmax = xy[0] + size; diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index a3b4b342fa1..ec0f193e780 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -303,11 +303,11 @@ static EditBone *get_nearest_editbonepoint( ebone_next_act = NULL; } - BLI_rcti_init_pt_size(&rect, mval, 5); + BLI_rcti_init_pt_radius(&rect, mval, 5); hits = view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect, true); if (hits == 0) { - BLI_rcti_init_pt_size(&rect, mval, 12); + BLI_rcti_init_pt_radius(&rect, mval, 12); hits = view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect, true); } /* See if there are any selected bones in this group */ diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 3168c7373f9..8690072ca85 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1907,7 +1907,7 @@ static bool sk_selectStroke(bContext *C, SK_Sketch *sketch, const int mval[2], c view3d_set_viewcontext(C, &vc); - BLI_rcti_init_pt_size(&rect, mval, 5); + BLI_rcti_init_pt_radius(&rect, mval, 5); hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect, true); diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 9c42d3eb08f..fff53d6885e 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -592,7 +592,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese view3d_set_viewcontext(C, &vc); - BLI_rcti_init_pt_size(&rect, mval, 12); + BLI_rcti_init_pt_radius(&rect, mval, 12); hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect, true); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 54ddd9aed46..fdfe316f5ed 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1070,7 +1070,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so /* check if we click in a socket */ for (node = snode->edittree->nodes.first; node; node = node->next) { - BLI_rctf_init_pt_size(&rect, cursor, NODE_SOCKSIZE + 4); + BLI_rctf_init_pt_radius(&rect, cursor, NODE_SOCKSIZE + 4); if (!(node->flag & NODE_HIDDEN)) { /* extra padding inside and out - allow dragging on the text areas too */ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 75e946485ec..f07727f8118 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -4887,7 +4887,7 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg rect.ymax = mval[1] + 1; } else { - BLI_rcti_init_pt_size(&rect, mval, margin); + BLI_rcti_init_pt_radius(&rect, mval, margin); } view3d_update_depths_rect(ar, &depth_temp, &rect); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 3239d07553f..011fc268655 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -1234,7 +1234,7 @@ static short mixed_bones_object_selectbuffer( do_nearest = do_nearest && !enumerate; - BLI_rcti_init(&rect, mval[0] - 14, mval[0] + 14, mval[1] - 14, mval[1] + 14); + BLI_rcti_init_pt_radius(&rect, mval, 14); hits15 = view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect, do_nearest); if (hits15 == 1) { return selectbuffer_ret_hits_15(buffer, hits15); @@ -1243,7 +1243,7 @@ static short mixed_bones_object_selectbuffer( has_bones15 = selectbuffer_has_bones(buffer, hits15); offs = 4 * hits15; - BLI_rcti_init(&rect, mval[0] - 9, mval[0] + 9, mval[1] - 9, mval[1] + 9); + BLI_rcti_init_pt_radius(&rect, mval, 9); hits9 = view3d_opengl_select(vc, buffer + offs, MAXPICKBUF - offs, &rect, do_nearest); if (hits9 == 1) { return selectbuffer_ret_hits_9(buffer, hits15, hits9); @@ -1252,7 +1252,7 @@ static short mixed_bones_object_selectbuffer( has_bones9 = selectbuffer_has_bones(buffer + offs, hits9); offs += 4 * hits9; - BLI_rcti_init(&rect, mval[0] - 5, mval[0] + 5, mval[1] - 5, mval[1] + 5); + BLI_rcti_init_pt_radius(&rect, mval, 5); hits5 = view3d_opengl_select(vc, buffer + offs, MAXPICKBUF - offs, &rect, do_nearest); if (hits5 == 1) { return selectbuffer_ret_hits_5(buffer, hits15, hits9, hits5); diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 683fbc4185a..85d2d9a92d7 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1185,7 +1185,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b /* case not a border select */ if (input->xmin == input->xmax) { /* seems to be default value for bones only now */ - BLI_rctf_init_pt_size(&rect, (const float[2]){input->xmin, input->ymin}, 12); + BLI_rctf_init_pt_radius(&rect, (const float[2]){input->xmin, input->ymin}, 12); } else { BLI_rctf_rcti_copy(&rect, input); |