EditCurve: Replace -1 with CU_ACT_NONE define

This commit is contained in:
Campbell Barton
2014-05-26 09:17:00 +10:00
parent eaf815f14a
commit d84af360ca
2 changed files with 4 additions and 4 deletions

View File

@@ -3984,7 +3984,7 @@ ListBase *BKE_curve_nurbs_get(Curve *cu)
void BKE_curve_nurb_active_set(Curve *cu, Nurb *nu)
{
if (nu == NULL) {
cu->actnu = -1;
cu->actnu = CU_ACT_NONE;
}
else {
ListBase *nurbs = BKE_curve_editNurbs_get(cu);

View File

@@ -1926,7 +1926,7 @@ static void ed_curve_delete_selected(Object *obedit)
}
if (a == 0) {
if (cu->actnu == nuindex)
cu->actnu = -1;
cu->actnu = CU_ACT_NONE;
BLI_remlink(nubase, nu);
keyIndex_delNurb(editnurb, nu);
@@ -1950,7 +1950,7 @@ static void ed_curve_delete_selected(Object *obedit)
}
if (a == 0) {
if (cu->actnu == nuindex)
cu->actnu = -1;
cu->actnu = CU_ACT_NONE;
BLI_remlink(nubase, nu);
keyIndex_delNurb(editnurb, nu);
@@ -4939,7 +4939,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
if ((nu == NULL) || (nu->type == CU_BEZIER && bezt == NULL) || (nu->type != CU_BEZIER && bp == NULL)) {
if (mode != 'e') {
if (cu->actnu >= 0)
if (cu->actnu != CU_ACT_NONE)
nu = BLI_findlink(&editnurb->nurbs, cu->actnu);
if (!nu || nu->type == CU_BEZIER) {