Rename BLI_rct*_init_pt_size -> radius

This commit is contained in:
Campbell Barton 2017-03-08 23:10:31 +11:00
parent 75cb4850f0
commit 6f3f891c58
9 changed files with 14 additions and 14 deletions

@ -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]);

@ -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;

@ -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 */

@ -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);

@ -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);

@ -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 */

@ -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);

@ -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);

@ -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);