forked from bartvdbraak/blender
undid commit to stop overdrawing IPO verts, it assumed that ipo verts were in order which it seems there not. (only the IPO;s I tested with were)
Still might be worth looking into somehow not drawing all the points.
This commit is contained in:
parent
e1828bbb63
commit
4c2ce83986
@ -1118,12 +1118,6 @@ static void draw_ipovertices(int sel)
|
||||
* (at least up to ver. 4349) */
|
||||
|
||||
a= ei->icu->totvert;
|
||||
|
||||
/* Dont bother looping through the points if the last point is to the left of teh xmin */
|
||||
bezt= ei->icu->bezt+(a-1);
|
||||
if ((ei->icu->ipo!=IPO_BEZ || !(ei->flag & IPO_EDIT)) && bezt->vec[1][0] < G.v2d->cur.xmin)
|
||||
continue;
|
||||
|
||||
bezt= ei->icu->bezt;
|
||||
bglBegin(GL_POINTS);
|
||||
|
||||
@ -1131,17 +1125,15 @@ static void draw_ipovertices(int sel)
|
||||
|
||||
/* IPO_DISPBITS is used for displaying layer ipo types as well as modes */
|
||||
if(ei->disptype==IPO_DISPBITS) {
|
||||
/*if (G.v2d->cur.xmin < bezt->vec[1][0] < G.v2d->cur.xmax) {*/
|
||||
ok= 0;
|
||||
|
||||
if (bezt->vec[1][0] > G.v2d->cur.xmax)
|
||||
break;
|
||||
|
||||
if(ei->flag & IPO_EDIT) {
|
||||
if( (bezt->f2 & 1) == sel ) ok= 1;
|
||||
}
|
||||
else ok= 1;
|
||||
|
||||
if(ok && bezt->vec[1][0] > G.v2d->cur.xmin) {
|
||||
if(ok) {
|
||||
val= bezt->vec[1][1];
|
||||
b= 0;
|
||||
v1[0]= bezt->vec[1][0];
|
||||
@ -1154,33 +1146,26 @@ static void draw_ipovertices(int sel)
|
||||
b++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else { /* normal non bit curves */
|
||||
/*}*/
|
||||
} else { /* normal non bit curves */
|
||||
if(ei->flag & IPO_EDIT) {
|
||||
if(ei->icu->ipo==IPO_BEZ) {
|
||||
/* Draw the editmode hendels for a bezier curve */
|
||||
if( (bezt->f1 & 1) == sel && bezt->vec[0][0] > G.v2d->cur.xmin)
|
||||
if( (bezt->f1 & 1) == sel)/* && G.v2d->cur.xmin < bezt->vec[0][0] < G.v2d->cur.xmax)*/
|
||||
bglVertex3fv(bezt->vec[0]);
|
||||
|
||||
if( (bezt->f3 & 1) == sel && bezt->vec[0][0] > G.v2d->cur.xmin)
|
||||
if( (bezt->f3 & 1) == sel)/* && G.v2d->cur.xmin < bezt->vec[2][0] < G.v2d->cur.xmax)*/
|
||||
bglVertex3fv(bezt->vec[2]);
|
||||
|
||||
} else if (bezt->vec[1][0] > G.v2d->cur.xmax)
|
||||
/* dont draw beyond the bounds for non bezier curves in editmode */
|
||||
break;
|
||||
}
|
||||
|
||||
if( (bezt->f2 & 1) == sel && bezt->vec[0][0] > G.v2d->cur.xmin)
|
||||
if( (bezt->f2 & 1) == sel) /* && G.v2d->cur.xmin < bezt->vec[1][0] < G.v2d->cur.xmax)*/
|
||||
bglVertex3fv(bezt->vec[1]);
|
||||
|
||||
}
|
||||
else {
|
||||
/* Since were not drawing any spline handels out of editmode
|
||||
we can break if were beyond the xmax */
|
||||
if (bezt->vec[1][0] > G.v2d->cur.xmax)
|
||||
break;
|
||||
|
||||
/* draw only if in bounds */
|
||||
if (bezt->vec[1][0] > G.v2d->cur.xmin)
|
||||
/*if (G.v2d->cur.xmin < bezt->vec[1][0] < G.v2d->cur.xmax)*/
|
||||
bglVertex3fv(bezt->vec[1]);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user