diff options
Diffstat (limited to 'source/blender/editors/curve/editcurve_query.c')
-rw-r--r-- | source/blender/editors/curve/editcurve_query.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/curve/editcurve_query.c b/source/blender/editors/curve/editcurve_query.c index 48571ab2a9b..56392aab5bf 100644 --- a/source/blender/editors/curve/editcurve_query.c +++ b/source/blender/editors/curve/editcurve_query.c @@ -26,6 +26,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_listbase.h" #include "BLI_math.h" #include "BKE_curve.h" @@ -170,7 +171,6 @@ void ED_curve_nurb_vert_selected_find( /* in nu and (bezt or bp) selected are written if there's 1 sel. */ /* if more points selected in 1 spline: return only nu, bezt and bp are 0 */ ListBase *editnurb = &cu->editnurb->nurbs; - Nurb *nu1; BezTriple *bezt1; BPoint *bp1; int a; @@ -179,13 +179,13 @@ void ED_curve_nurb_vert_selected_find( *r_bezt = NULL; *r_bp = NULL; - for (nu1 = editnurb->first; nu1; nu1 = nu1->next) { + LISTBASE_FOREACH (Nurb *, nu1, editnurb) { if (nu1->type == CU_BEZIER) { bezt1 = nu1->bezt; a = nu1->pntsu; while (a--) { if (BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt1)) { - if (*r_nu != NULL && *r_nu != nu1) { + if (!ELEM(*r_nu, NULL, nu1)) { *r_nu = NULL; *r_bp = NULL; *r_bezt = NULL; @@ -209,7 +209,7 @@ void ED_curve_nurb_vert_selected_find( a = nu1->pntsu * nu1->pntsv; while (a--) { if (bp1->f1 & SELECT) { - if (*r_nu != NULL && *r_nu != nu1) { + if (!ELEM(*r_nu, NULL, nu1)) { *r_bp = NULL; *r_bezt = NULL; *r_nu = NULL; |