Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-23 22:25:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-23 22:25:45 +0400
commit56b28635e74c37e33b44baaa770ecf7d58a32895 (patch)
treef6600db849a7cba0ea81d74148949de4d6fddb74 /source/blender/editors
parentdfbc793d885ae603089e5764cdd25fb2c983a03b (diff)
code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/keyframes_edit.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c4
-rw-r--r--source/blender/editors/include/UI_view2d.h4
-rw-r--r--source/blender/editors/interface/interface_handlers.c18
-rw-r--r--source/blender/editors/interface/interface_ops.c8
-rw-r--r--source/blender/editors/interface/interface_panel.c2
-rw-r--r--source/blender/editors/interface/interface_regions.c6
-rw-r--r--source/blender/editors/mask/mask_select.c4
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c2
-rw-r--r--source/blender/editors/screen/screen_ops.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c18
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c2
-rw-r--r--source/blender/editors/space_clip/tracking_select.c4
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_node/drawnode.c2
-rw-r--r--source/blender/editors/space_node/node_draw.c6
-rw-r--r--source/blender/editors/space_node/node_edit.c12
-rw-r--r--source/blender/editors/space_node/node_relationships.c2
-rw-r--r--source/blender/editors/space_node/node_select.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c16
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c10
22 files changed, 68 insertions, 68 deletions
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 78ac729f16e..b277d0eccb5 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -505,7 +505,7 @@ static short ok_bezier_region(KeyframeEditData *ked, BezTriple *bezt)
if (ked->data) {
short ok = 0;
- #define KEY_CHECK_OK(_index) BLI_in_rctf_v(ked->data, bezt->vec[_index])
+ #define KEY_CHECK_OK(_index) BLI_rctf_isect_pt_v(ked->data, bezt->vec[_index])
KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
#undef KEY_CHECK_OK
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index c5f2ad4254b..6f2952a1967 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -825,7 +825,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], shor
}
/* do boundbox check first */
- if (BLI_in_rcti(rect, x0, y0)) {
+ if (BLI_rcti_isect_pt(rect, x0, y0)) {
/* only check if point is inside */
if ( ((x0 - mval[0]) * (x0 - mval[0]) + (y0 - mval[1]) * (y0 - mval[1])) <= rad * rad) {
/* free stroke */
@@ -874,7 +874,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], shor
}
/* check that point segment of the boundbox of the eraser stroke */
- if (BLI_in_rcti(rect, x0, y0) || BLI_in_rcti(rect, x1, y1)) {
+ if (BLI_rcti_isect_pt(rect, x0, y0) || BLI_rcti_isect_pt(rect, x1, y1)) {
/* check if point segment of stroke had anything to do with
* eraser region (either within stroke painted, or on its lines)
* - this assumes that linewidth is irrelevant
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 9ab024a8b76..3a8f05a76f0 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -120,8 +120,8 @@ enum {
/* Macros: */
/* test if mouse in a scrollbar (assume that scroller availability has been tested) */
-#define IN_2D_VERT_SCROLL(v2d, co) (BLI_in_rcti_v(&v2d->vert, co))
-#define IN_2D_HORIZ_SCROLL(v2d, co) (BLI_in_rcti_v(&v2d->hor, co))
+#define IN_2D_VERT_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->vert, co))
+#define IN_2D_HORIZ_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->hor, co))
/* ------------------------------------------ */
/* Type definitions: */
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 39567a5b00b..33a5a0729ee 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -698,7 +698,7 @@ static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event)
rect.xmax -= delta / 2;
}
- return BLI_in_rcti(&rect, x, y);
+ return BLI_rcti_isect_pt(&rect, x, y);
}
static int ui_but_start_drag(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
@@ -4918,7 +4918,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
static int ui_but_contains_pt(uiBut *but, int mx, int my)
{
- return BLI_in_rctf(&but->rect, mx, my);
+ return BLI_rctf_isect_pt(&but->rect, mx, my);
}
static uiBut *ui_but_find_activated(ARegion *ar)
@@ -4994,7 +4994,7 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
uiBlock *block;
/* check if the mouse is in the region */
- if (!BLI_in_rcti(&ar->winrct, x, y)) {
+ if (!BLI_rcti_isect_pt(&ar->winrct, x, y)) {
for (block = ar->uiblocks.first; block; block = block->next)
block->auto_open = FALSE;
@@ -5033,7 +5033,7 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
}
/* check if in the rect */
- if (!BLI_in_rcti(&mask_rct, mx, my))
+ if (!BLI_rcti_isect_pt(&mask_rct, mx, my))
return 0;
}
@@ -5086,7 +5086,7 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y)
/* CLIP_EVENTS prevents the event from reaching other blocks */
if (block->flag & UI_BLOCK_CLIP_EVENTS) {
/* check if mouse is inside block */
- if (BLI_in_rctf(&block->rect, mx, my)) {
+ if (BLI_rctf_isect_pt(&block->rect, mx, my)) {
break;
}
}
@@ -6100,7 +6100,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
ui_window_to_block(ar, block, &mx, &my);
/* check if mouse is inside block */
- inside = BLI_in_rctf(&block->rect, mx, my);
+ inside = BLI_rctf_isect_pt(&block->rect, mx, my);
/* if there's an active modal button, don't check events or outside, except for search menu */
but = ui_but_find_activated(ar);
@@ -6349,7 +6349,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
uiSafetyRct *saferct = block->saferct.first;
if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) && event->val == KM_PRESS) {
- if (saferct && !BLI_in_rctf(&saferct->parent, event->x, event->y)) {
+ if (saferct && !BLI_rctf_isect_pt(&saferct->parent, event->x, event->y)) {
if (block->flag & (UI_BLOCK_OUT_1))
menu->menuretval = UI_RETURN_OK;
else
@@ -6382,9 +6382,9 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
* events we check all preceding block rects too to make
* arrow keys navigation work */
if (event->type != MOUSEMOVE || saferct == block->saferct.first) {
- if (BLI_in_rctf(&saferct->parent, (float)event->x, (float)event->y))
+ if (BLI_rctf_isect_pt(&saferct->parent, (float)event->x, (float)event->y))
break;
- if (BLI_in_rctf(&saferct->safety, (float)event->x, (float)event->y))
+ if (BLI_rctf_isect_pt(&saferct->safety, (float)event->x, (float)event->y))
break;
}
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index d3b81974479..67c0d04a79f 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -140,10 +140,10 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
wmWindow *win = CTX_wm_window(C);
ScrArea *sa;
for (sa = win->screen->areabase.first; sa; sa = sa->next) {
- if (BLI_in_rcti(&sa->totrct, mx, my)) {
+ if (BLI_rcti_isect_pt(&sa->totrct, mx, my)) {
if (sa->spacetype == SPACE_IMAGE) {
ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if (BLI_in_rcti(&ar->winrct, mx, my)) {
+ if (BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
SpaceImage *sima = sa->spacedata.first;
int mval[2] = {mx - ar->winrct.xmin,
my - ar->winrct.ymin};
@@ -155,7 +155,7 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
}
else if (sa->spacetype == SPACE_NODE) {
ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if (BLI_in_rcti(&ar->winrct, mx, my)) {
+ if (BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
SpaceNode *snode = sa->spacedata.first;
int mval[2] = {mx - ar->winrct.xmin,
my - ar->winrct.ymin};
@@ -167,7 +167,7 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
}
else if (sa->spacetype == SPACE_CLIP) {
ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if (BLI_in_rcti(&ar->winrct, mx, my)) {
+ if (BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
SpaceClip *sc = sa->spacedata.first;
int mval[2] = {mx - ar->winrct.xmin,
my - ar->winrct.ymin};
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index d0e66f532cc..fa3e04d1351 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -979,7 +979,7 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
short align = panel_aligned(sa, ar), dx = 0, dy = 0;
/* first clip for window, no dragging outside */
- if (!BLI_in_rcti_v(&ar->winrct, &event->x))
+ if (!BLI_rcti_isect_pt_v(&ar->winrct, &event->x))
return;
dx = (event->x - data->startx) & ~(PNL_GRID - 1);
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 8dee1ff6a13..96c1b00d46d 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -899,7 +899,7 @@ int ui_searchbox_inside(ARegion *ar, int x, int y)
{
uiSearchboxData *data = ar->regiondata;
- return(BLI_in_rcti(&data->bbox, x - ar->winrct.xmin, y - ar->winrct.ymin));
+ return(BLI_rcti_isect_pt(&data->bbox, x - ar->winrct.xmin, y - ar->winrct.ymin));
}
/* string validated to be of correct length (but->hardmax) */
@@ -935,13 +935,13 @@ void ui_searchbox_event(bContext *C, ARegion *ar, uiBut *but, wmEvent *event)
ui_searchbox_select(C, ar, but, 1);
break;
case MOUSEMOVE:
- if (BLI_in_rcti(&ar->winrct, event->x, event->y)) {
+ if (BLI_rcti_isect_pt(&ar->winrct, event->x, event->y)) {
rcti rect;
int a;
for (a = 0; a < data->items.totitem; a++) {
ui_searchbox_butrect(&rect, data, a);
- if (BLI_in_rcti(&rect, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin)) {
+ if (BLI_rcti_isect_pt(&rect, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin)) {
if (data->active != a + 1) {
data->active = a + 1;
ui_searchbox_select(C, ar, but, 0);
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 285306ce12f..ace427f65ab 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -440,7 +440,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
/* TODO: handles? */
/* TODO: uw? */
- if (BLI_in_rctf_v(&rectf, point_deform->bezt.vec[1])) {
+ if (BLI_rctf_isect_pt_v(&rectf, point_deform->bezt.vec[1])) {
BKE_mask_point_select_set(point, mode == GESTURE_MODAL_SELECT);
BKE_mask_point_select_set_handle(point, mode == GESTURE_MODAL_SELECT);
}
@@ -525,7 +525,7 @@ static int do_lasso_select_mask(bContext *C, int mcords[][2], short moves, short
point_deform->bezt.vec[1][0], point_deform->bezt.vec[1][1],
&screen_co[0], &screen_co[1]);
- if (BLI_in_rcti(&rect, screen_co[0], screen_co[1]) &&
+ if (BLI_rcti_isect_pt(&rect, screen_co[0], screen_co[1]) &&
BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], INT_MAX))
{
BKE_mask_point_select_set(point, select);
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 59310f9e675..0bfe5d04e5e 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -161,7 +161,7 @@ void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar)
ys = (az->y1 + az->y2) / 2;
/* test if inside */
- if (BLI_in_rcti(&ar->winrct, xs, ys)) {
+ if (BLI_rcti_isect_pt(&ar->winrct, xs, ys)) {
az->do_draw = TRUE;
}
}
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index d1458fec94b..adffb97c16f 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1267,7 +1267,7 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
}
if (sa) {
for (ar = sa->regionbase.first; ar; ar = ar->next) {
- if (BLI_in_rcti_v(&ar->winrct, &event->x))
+ if (BLI_rcti_isect_pt_v(&ar->winrct, &event->x))
scr->subwinactive = ar->swinid;
}
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index ed519dc626c..823037a7903 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -521,7 +521,7 @@ static ScrArea *screen_areahascursor(bScreen *scr, int x, int y)
ScrArea *sa = NULL;
sa = scr->areabase.first;
while (sa) {
- if (BLI_in_rcti(&sa->totrct, x, y)) break;
+ if (BLI_rcti_isect_pt(&sa->totrct, x, y)) break;
sa = sa->next;
}
@@ -540,7 +540,7 @@ static int actionzone_area_poll(bContext *C)
int y = win->eventstate->y;
for (az = sa->actionzones.first; az; az = az->next)
- if (BLI_in_rcti(&az->rect, x, y))
+ if (BLI_rcti_isect_pt(&az->rect, x, y))
return 1;
}
return 0;
@@ -551,7 +551,7 @@ AZone *is_in_area_actionzone(ScrArea *sa, const int xy[2])
AZone *az = NULL;
for (az = sa->actionzones.first; az; az = az->next) {
- if (BLI_in_rcti_v(&az->rect, xy)) {
+ if (BLI_rcti_isect_pt_v(&az->rect, xy)) {
if (az->type == AZONE_AREA) {
/* no triangle intersect but a hotspot circle based on corner */
int radius = (xy[0] - az->x1) * (xy[0] - az->x1) + (xy[1] - az->y1) * (xy[1] - az->y1);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 223d90d404d..d916ee299b6 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1615,7 +1615,7 @@ static int line_clip_rect2f(
if (fabsf(l1[0] - l2[0]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/
- if (BLI_in_rctf_v(rect, l1)) {
+ if (BLI_rctf_isect_pt_v(rect, l1)) {
copy_v2_v2(l1_clip, l1);
copy_v2_v2(l2_clip, l2);
return 1;
@@ -1643,7 +1643,7 @@ static int line_clip_rect2f(
}
if (fabsf(l1[1] - l2[1]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/
- if (BLI_in_rctf_v(rect, l1)) {
+ if (BLI_rctf_isect_pt_v(rect, l1)) {
copy_v2_v2(l1_clip, l1);
copy_v2_v2(l2_clip, l2);
return 1;
@@ -1667,12 +1667,12 @@ static int line_clip_rect2f(
/* Done with vertical lines */
/* are either of the points inside the rectangle ? */
- if (BLI_in_rctf_v(rect, l1)) {
+ if (BLI_rctf_isect_pt_v(rect, l1)) {
copy_v2_v2(l1_clip, l1);
ok1 = 1;
}
- if (BLI_in_rctf_v(rect, l2)) {
+ if (BLI_rctf_isect_pt_v(rect, l2)) {
copy_v2_v2(l2_clip, l2);
ok2 = 1;
}
@@ -1820,7 +1820,7 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s
* this is even less work then an intersection test
*/
#if 0
- if (BLI_in_rctf_v(bucket_bounds, cent))
+ if (BLI_rctf_isect_pt_v(bucket_bounds, cent))
return 1;
#endif
@@ -1987,9 +1987,9 @@ static void project_bucket_clip_face(
float bucket_bounds_ss[4][2];
/* get the UV space bounding box */
- inside_bucket_flag |= BLI_in_rctf_v(bucket_bounds, v1coSS);
- inside_bucket_flag |= BLI_in_rctf_v(bucket_bounds, v2coSS) << 1;
- inside_bucket_flag |= BLI_in_rctf_v(bucket_bounds, v3coSS) << 2;
+ inside_bucket_flag |= BLI_rctf_isect_pt_v(bucket_bounds, v1coSS);
+ inside_bucket_flag |= BLI_rctf_isect_pt_v(bucket_bounds, v2coSS) << 1;
+ inside_bucket_flag |= BLI_rctf_isect_pt_v(bucket_bounds, v3coSS) << 2;
if (inside_bucket_flag == ISECT_ALL3) {
/* all screenspace points are inside the bucket bounding box, this means we don't need to clip and can simply return the UVs */
@@ -2816,7 +2816,7 @@ static int project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucke
fidx = mf->v4 ? 3 : 2;
do {
v = ps->screenCoords[(*(&mf->v1 + fidx))];
- if (BLI_in_rctf_v(&bucket_bounds, v)) {
+ if (BLI_rctf_isect_pt_v(&bucket_bounds, v)) {
return 1;
}
} while (fidx--);
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index e94b28d22fa..71dcd326887 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -321,7 +321,7 @@ static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track),
{
BorderSelectuserData *data = (BorderSelectuserData *) userdata;
- if (BLI_in_rctf(&data->rect, scene_framenr, val)) {
+ if (BLI_rctf_isect_pt(&data->rect, scene_framenr, val)) {
int flag = 0;
if (coord == 0)
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c
index 5a79e832ebe..507e492497d 100644
--- a/source/blender/editors/space_clip/tracking_select.c
+++ b/source/blender/editors/space_clip/tracking_select.c
@@ -363,7 +363,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
MovieTrackingMarker *marker = BKE_tracking_marker_get(track, framenr);
if (MARKER_VISIBLE(sc, track, marker)) {
- if (BLI_in_rctf_v(&rectf, marker->pos)) {
+ if (BLI_rctf_isect_pt_v(&rectf, marker->pos)) {
if (mode == GESTURE_MODAL_SELECT)
BKE_tracking_track_flag_set(track, TRACK_AREA_ALL, SELECT);
else
@@ -441,7 +441,7 @@ static int do_lasso_select_marker(bContext *C, int mcords[][2], short moves, sho
/* marker in screen coords */
ED_clip_point_stable_pos__reverse(sc, ar, marker->pos, screen_co);
- if (BLI_in_rcti(&rect, screen_co[0], screen_co[1]) &&
+ if (BLI_rcti_isect_pt(&rect, screen_co[0], screen_co[1]) &&
BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], V2D_IS_CLIPPED))
{
if (select)
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 01962853556..ff7a71af8c2 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -327,7 +327,7 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
rect.xmin = rect.xmax = event->mval[0];
rect.ymin = rect.ymax = event->mval[1];
- if (!BLI_in_rcti(&ar->v2d.mask, rect.xmin, rect.ymin))
+ if (!BLI_rcti_isect_pt(&ar->v2d.mask, rect.xmin, rect.ymin))
return OPERATOR_CANCELLED;
/* single select, deselect all selected first */
@@ -525,7 +525,7 @@ int file_highlight_set(SpaceFile *sfile, ARegion *ar, int mx, int my)
mx -= ar->winrct.xmin;
my -= ar->winrct.ymin;
- if (BLI_in_rcti(&ar->v2d.mask, mx, my)) {
+ if (BLI_rcti_isect_pt(&ar->v2d.mask, mx, my)) {
float fx, fy;
int active_file;
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 125d5e3be77..8a1f0e5b611 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -454,7 +454,7 @@ static int node_resize_area_default(bNode *node, int x, int y)
rctf totr = node->totr;
/* right part of node */
totr.xmin = node->totr.xmax - 20.0f;
- if (BLI_in_rctf(&totr, x, y))
+ if (BLI_rctf_isect_pt(&totr, x, y))
return NODE_RESIZE_RIGHT;
else
return 0;
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 0f559b0cbfc..f1a91df6f53 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -476,12 +476,12 @@ void node_update_default(const bContext *C, bNodeTree *ntree, bNode *node)
int node_select_area_default(bNode *node, int x, int y)
{
- return BLI_in_rctf(&node->totr, x, y);
+ return BLI_rctf_isect_pt(&node->totr, x, y);
}
int node_tweak_area_default(bNode *node, int x, int y)
{
- return BLI_in_rctf(&node->totr, x, y);
+ return BLI_rctf_isect_pt(&node->totr, x, y);
}
int node_get_colorid(bNode *node)
@@ -989,7 +989,7 @@ void node_set_cursor(wmWindow *win, SpaceNode *snode)
else {
/* check nodes front to back */
for (node = ntree->nodes.last; node; node = node->prev) {
- if (BLI_in_rctf(&node->totr, snode->cursor[0], snode->cursor[1]))
+ if (BLI_rctf_isect_pt(&node->totr, snode->cursor[0], snode->cursor[1]))
break; /* first hit on node stops */
}
if (node) {
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 382c02c8765..fbae8b17ebf 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1037,11 +1037,11 @@ static int UNUSED_FUNCTION(node_mouse_groupheader) (SpaceNode * snode)
// XXX areamouseco_to_ipoco(G.v2d, mval, &mx, &my);
/* click in header or outside? */
- if (BLI_in_rctf(&gnode->totr, mx, my) == 0) {
+ if (BLI_rctf_isect_pt(&gnode->totr, mx, my) == 0) {
rctf rect = gnode->totr;
rect.ymax += NODE_DY;
- if (BLI_in_rctf(&rect, mx, my) == 0)
+ if (BLI_rctf_isect_pt(&rect, mx, my) == 0)
snode_make_group_editable(snode, NULL); /* toggles, so exits editmode */
// else
// XXX transform_nodes(snode->nodetree, 'g', "Move group");
@@ -1085,7 +1085,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
if (in_out & SOCK_IN) {
for (sock = node->inputs.first; sock; sock = sock->next) {
if (!nodeSocketIsHidden(sock)) {
- if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
if (node == visible_node(snode, &rect)) {
*nodep = node;
*sockp = sock;
@@ -1098,7 +1098,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
if (in_out & SOCK_OUT) {
for (sock = node->outputs.first; sock; sock = sock->next) {
if (!nodeSocketIsHidden(sock)) {
- if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
if (node == visible_node(snode, &rect)) {
*nodep = node;
*sockp = sock;
@@ -1116,7 +1116,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
if (in_out & SOCK_IN) {
for (sock = snode->edittree->outputs.first; sock; sock = sock->next) {
if (!nodeSocketIsHidden(sock)) {
- if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
*nodep = NULL; /* NULL node pointer indicates group socket */
*sockp = sock;
return 1;
@@ -1127,7 +1127,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
if (in_out & SOCK_OUT) {
for (sock = snode->edittree->inputs.first; sock; sock = sock->next) {
if (!nodeSocketIsHidden(sock)) {
- if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
*nodep = NULL; /* NULL node pointer indicates group socket */
*sockp = sock;
return 1;
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index f5a65065895..12c221b9273 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -1140,7 +1140,7 @@ static int node_attach_exec(bContext *C, wmOperator *UNUSED(op))
/* skip selected, those are the nodes we want to attach */
if ((frame->type != NODE_FRAME) || (frame->flag & NODE_SELECT))
continue;
- if (BLI_in_rctf(&frame->totr, snode->cursor[0], snode->cursor[1]))
+ if (BLI_rctf_isect_pt(&frame->totr, snode->cursor[0], snode->cursor[1]))
break;
}
if (frame) {
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index f41f203aefe..a56d76a3ef7 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -563,7 +563,7 @@ static int do_lasso_select_node(bContext *C, int mcords[][2], short moves, short
cent[0], cent[1],
&screen_co[0], &screen_co[1]);
- if (BLI_in_rcti(&rect, screen_co[0], screen_co[1]) &&
+ if (BLI_rcti_isect_pt(&rect, screen_co[0], screen_co[1]) &&
BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], INT_MAX))
{
if (select)
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 49d7c9ba28c..6f3cc744537 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -291,7 +291,7 @@ static int view3d_selectable_data(bContext *C)
/* helper also for borderselect */
static int edge_fully_inside_rect(rcti *rect, short x1, short y1, short x2, short y2)
{
- return BLI_in_rcti(rect, x1, y1) && BLI_in_rcti(rect, x2, y2);
+ return BLI_rcti_isect_pt(rect, x1, y1) && BLI_rcti_isect_pt(rect, x2, y2);
}
static int edge_inside_rect(rcti *rect, short x1, short y1, short x2, short y2)
@@ -394,7 +394,7 @@ static void do_lasso_select_mesh__doSelectVert(void *userData, BMVert *eve, int
{
LassoSelectUserData *data = userData;
- if (BLI_in_rcti(data->rect, x, y) &&
+ if (BLI_rcti_isect_pt(data->rect, x, y) &&
BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED))
{
BM_vert_select_set(data->vc->em->bm, eve, data->select);
@@ -425,7 +425,7 @@ static void do_lasso_select_mesh__doSelectFace(void *userData, BMFace *efa, int
{
LassoSelectUserData *data = userData;
- if (BLI_in_rcti(data->rect, x, y) &&
+ if (BLI_rcti_isect_pt(data->rect, x, y) &&
BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED))
{
BM_face_select_set(data->vc->em->bm, efa, data->select);
@@ -769,7 +769,7 @@ static void do_lasso_select_node(int mcords[][2], short moves, short select)
node_centf[1] = BLI_RCT_CENTER_Y(&node->totr);
ipoco_to_areaco_noclip(G.v2d, node_centf, node_cent);
- if (BLI_in_rcti_v(&rect, node_cent) && BLI_lasso_is_point_inside(mcords, moves, node_cent[0], node_cent[1])) {
+ if (BLI_rcti_isect_pt_v(&rect, node_cent) && BLI_lasso_is_point_inside(mcords, moves, node_cent[0], node_cent[1])) {
if (select) {
node->flag |= SELECT;
}
@@ -1552,7 +1552,7 @@ static void do_nurbs_box_select__doSelect(void *userData, Nurb *UNUSED(nu), BPoi
Object *obedit = data->vc->obedit;
Curve *cu = (Curve *)obedit->data;
- if (BLI_in_rcti(data->rect, x, y)) {
+ if (BLI_rcti_isect_pt(data->rect, x, y)) {
if (bp) {
bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT);
if (bp == cu->lastsel && !(bp->f1 & 1)) cu->lastsel = NULL;
@@ -1599,7 +1599,7 @@ static void do_lattice_box_select__doSelect(void *userData, BPoint *bp, int x, i
{
BoxSelectUserData *data = userData;
- if (BLI_in_rcti(data->rect, x, y)) {
+ if (BLI_rcti_isect_pt(data->rect, x, y)) {
bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT);
}
}
@@ -1624,7 +1624,7 @@ static void do_mesh_box_select__doSelectVert(void *userData, BMVert *eve, int x,
{
BoxSelectUserData *data = userData;
- if (BLI_in_rcti(data->rect, x, y)) {
+ if (BLI_rcti_isect_pt(data->rect, x, y)) {
BM_vert_select_set(data->vc->em->bm, eve, data->select);
}
}
@@ -1650,7 +1650,7 @@ static void do_mesh_box_select__doSelectFace(void *userData, BMFace *efa, int x,
{
BoxSelectUserData *data = userData;
- if (BLI_in_rcti(data->rect, x, y)) {
+ if (BLI_rcti_isect_pt(data->rect, x, y)) {
BM_face_select_set(data->vc->em->bm, efa, data->select);
}
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index d3336d105c4..6f3e6bee850 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -2567,7 +2567,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
if (uvedit_face_visible_test(scene, ima, efa, tf)) {
uv_poly_center(em, efa, cent);
- if (BLI_in_rctf_v(&rectf, cent)) {
+ if (BLI_rctf_isect_pt_v(&rectf, cent)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
change = 1;
}
@@ -2592,13 +2592,13 @@ static int border_select_exec(bContext *C, wmOperator *op)
if (!pinned || (ts->uv_flag & UV_SYNC_SELECTION) ) {
/* UV_SYNC_SELECTION - can't do pinned selection */
- if (BLI_in_rctf_v(&rectf, luv->uv)) {
+ if (BLI_rctf_isect_pt_v(&rectf, luv->uv)) {
if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
else uvedit_uv_select_disable(em, scene, l);
}
}
else if (pinned) {
- if ((luv->flag & MLOOPUV_PINNED) && BLI_in_rctf_v(&rectf, luv->uv)) {
+ if ((luv->flag & MLOOPUV_PINNED) && BLI_rctf_isect_pt_v(&rectf, luv->uv)) {
if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
else uvedit_uv_select_disable(em, scene, l);
}
@@ -2771,7 +2771,7 @@ static int do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, sh
float cent[2];
uv_poly_center(em, efa, cent);
UI_view2d_view_to_region(&ar->v2d, cent[0], cent[1], &screen_uv[0], &screen_uv[1]);
- if (BLI_in_rcti_v(&rect, screen_uv) &&
+ if (BLI_rcti_isect_pt_v(&rect, screen_uv) &&
BLI_lasso_is_point_inside(mcords, moves, screen_uv[0], screen_uv[1], V2D_IS_CLIPPED))
{
uvedit_face_select_enable(scene, em, efa, FALSE);
@@ -2788,7 +2788,7 @@ static int do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, sh
if ((select) != (uvedit_uv_select_test(em, scene, l))) {
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
UI_view2d_view_to_region(&ar->v2d, luv->uv[0], luv->uv[1], &screen_uv[0], &screen_uv[1]);
- if (BLI_in_rcti_v(&rect, screen_uv) &&
+ if (BLI_rcti_isect_pt_v(&rect, screen_uv) &&
BLI_lasso_is_point_inside(mcords, moves, screen_uv[0], screen_uv[1], V2D_IS_CLIPPED))
{
if (select) {