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:
Diffstat (limited to 'source/blender/editors/curve/editcurve_query.c')
-rw-r--r--source/blender/editors/curve/editcurve_query.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/curve/editcurve_query.c b/source/blender/editors/curve/editcurve_query.c
index 774065b06ff..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"
@@ -62,7 +63,7 @@ static void ED_curve_pick_vert__do_closest(void *userData,
bool is_changed;
} *data = userData;
- short flag;
+ uint8_t flag;
float dist_test;
if (bp) {
@@ -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;