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>2007-12-04 02:26:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-12-04 02:26:45 +0300
commit89205964b3eae9d66cbfabb619eb3ece3ad04a20 (patch)
treef52402f746ff973f7462efd018dc210c0188a480
parenta2d6623689bfe75fd20ee59062a7fe1718678a5c (diff)
curve proportional edit mode wasn't working with draw handles disabled (own error)
-rw-r--r--source/blender/include/blendef.h4
-rw-r--r--source/blender/src/editipo.c14
-rw-r--r--source/blender/src/editview.c18
-rw-r--r--source/blender/src/transform_conversions.c18
4 files changed, 32 insertions, 22 deletions
diff --git a/source/blender/include/blendef.h b/source/blender/include/blendef.h
index b237a2dd601..8f9de747c2a 100644
--- a/source/blender/include/blendef.h
+++ b/source/blender/include/blendef.h
@@ -121,9 +121,9 @@
#define ISPOIN3(a, b, c, d) ( (a->b) && (a->c) && (a->d) )
#define ISPOIN4(a, b, c, d, e) ( (a->b) && (a->c) && (a->d) && (a->e) )
-#define BEZSELECTED(bezt) (((bezt)->f1 & 1) || ((bezt)->f2 & 1) || ((bezt)->f3 & 1))
+#define BEZSELECTED(bezt) (((bezt)->f1 & SELECT) || ((bezt)->f2 & SELECT) || ((bezt)->f3 & SELECT))
/* for curve objects in editmode that can have hidden handles - may use for IPO's later */
-#define BEZSELECTED_HIDDENHANDLES(bezt) ((G.f & G_HIDDENHANDLES) ? (bezt)->f2 & 1 : BEZSELECTED(bezt))
+#define BEZSELECTED_HIDDENHANDLES(bezt) ((G.f & G_HIDDENHANDLES) ? (bezt)->f2 & SELECT : BEZSELECTED(bezt))
/* psfont */
#define FNT_PDRAW 1
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c
index 53ccb13a1d3..5698657767e 100644
--- a/source/blender/src/editipo.c
+++ b/source/blender/src/editipo.c
@@ -1318,14 +1318,14 @@ void update_editipo_flags(void)
for(a=0; a<G.sipo->totipo; a++) {
if(ik->data[a]) {
if(ik->flag & 1) {
- ik->data[a]->f1 |= 1;
- ik->data[a]->f2 |= 1;
- ik->data[a]->f3 |= 1;
+ ik->data[a]->f1 |= SELECT;
+ ik->data[a]->f2 |= SELECT;
+ ik->data[a]->f3 |= SELECT;
}
else {
- ik->data[a]->f1 &= ~1;
- ik->data[a]->f2 &= ~1;
- ik->data[a]->f3 &= ~1;
+ ik->data[a]->f1 &= ~SELECT;
+ ik->data[a]->f2 &= ~SELECT;
+ ik->data[a]->f3 &= ~SELECT;
}
}
}
@@ -1412,7 +1412,7 @@ static short findnearest_ipovert(IpoCurve **icu, BezTriple **bezt)
}
else temp= abs(mval[0]- sco[1][0])+ abs(mval[1]- sco[1][1]);
- if( bezt1->f2 & 1) temp+=5;
+ if( bezt1->f2 & SELECT) temp+=5;
if(temp<dist) {
hpoint= 1;
*bezt= bezt1;
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c
index e18b73ced49..f0832032ac7 100644
--- a/source/blender/src/editview.c
+++ b/source/blender/src/editview.c
@@ -537,7 +537,7 @@ static void do_lasso_select_curve__doSelect(void *userData, Nurb *nu, BPoint *bp
} else {
if (G.f & G_HIDDENHANDLES) {
/* can only be beztindex==0 here since handles are hidden */
- bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f1|SELECT):(bezt->f1&~SELECT);
+ bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT);
} else {
if (beztindex==0) {
bezt->f1 = data->select?(bezt->f1|SELECT):(bezt->f1&~SELECT);
@@ -1603,14 +1603,14 @@ static void do_nurbs_box_select__doSelect(void *userData, Nurb *nu, BPoint *bp,
} else {
if (G.f & G_HIDDENHANDLES) {
/* can only be beztindex==0 here since handles are hidden */
- bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f1|1):(bezt->f1&~1);
+ bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT);
} else {
if (beztindex==0) {
- bezt->f1 = data->select?(bezt->f1|1):(bezt->f1&~1);
+ bezt->f1 = data->select?(bezt->f1|SELECT):(bezt->f1&~SELECT);
} else if (beztindex==1) {
- bezt->f2 = data->select?(bezt->f2|1):(bezt->f2&~1);
+ bezt->f2 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT);
} else {
- bezt->f3 = data->select?(bezt->f3|1):(bezt->f3&~1);
+ bezt->f3 = data->select?(bezt->f3|SELECT):(bezt->f3&~SELECT);
}
}
}
@@ -2051,14 +2051,14 @@ static void nurbscurve_selectionCB__doSelect(void *userData, Nurb *nu, BPoint *b
if (r<=data->radius) {
if (bp) {
- bp->f1 = data->select?(bp->f1|1):(bp->f1&~1);
+ bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT);
} else {
if (beztindex==0) {
- bezt->f1 = data->select?(bezt->f1|1):(bezt->f1&~1);
+ bezt->f1 = data->select?(bezt->f1|SELECT):(bezt->f1&~SELECT);
} else if (beztindex==1) {
- bezt->f2 = data->select?(bezt->f2|1):(bezt->f2&~1);
+ bezt->f2 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT);
} else {
- bezt->f3 = data->select?(bezt->f3|1):(bezt->f3&~1);
+ bezt->f3 = data->select?(bezt->f3|SELECT):(bezt->f3&~SELECT);
}
}
}
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index bfb90977715..f96e58bdbf7 100644
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -1206,8 +1206,13 @@ static void createTransCurveVerts(TransInfo *t)
VECCOPY(td->iloc, bezt->vec[0]);
td->loc= bezt->vec[0];
VECCOPY(td->center, bezt->vec[1]);
- if(bezt->f1 & 1 || G.f & G_HIDDENHANDLES) td->flag= TD_SELECTED;
- else td->flag= 0;
+ if (G.f & G_HIDDENHANDLES) {
+ if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
+ else td->flag= 0;
+ } else {
+ if(bezt->f1 & SELECT) td->flag= TD_SELECTED;
+ else td->flag= 0;
+ }
td->ext = NULL;
td->tdi = NULL;
td->val = NULL;
@@ -1254,8 +1259,13 @@ static void createTransCurveVerts(TransInfo *t)
VECCOPY(td->iloc, bezt->vec[2]);
td->loc= bezt->vec[2];
VECCOPY(td->center, bezt->vec[1]);
- if(bezt->f3 & SELECT || (G.f & G_HIDDENHANDLES)) td->flag= TD_SELECTED;
- else td->flag= 0;
+ if (G.f & G_HIDDENHANDLES) {
+ if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
+ else td->flag= 0;
+ } else {
+ if(bezt->f3 & SELECT) td->flag= TD_SELECTED;
+ else td->flag= 0;
+ }
td->ext = NULL;
td->tdi = NULL;
td->val = NULL;