From e9fed9bd8c2f18ed56a1ccfa5a3a0da12827c881 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 30 Jul 2011 05:04:49 +0000 Subject: Bugfix: When only one handle was selected in Graph Editor, the line of the other handle were not drawn This only happened when the "only on selected keyframes" option was enabled --- source/blender/editors/space_graph/graph_draw.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index f668b4b4a5f..67543d37859 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -356,10 +356,6 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) float *fp; unsigned char col[4]; - /* if only selected keyframes have handles shown, skip the first round */ - if ((sel == 0) && (sipo->flag & SIPO_SELVHANDLESONLY)) - continue; - for (b= 0; b < fcu->totvert; b++, prevbezt=bezt, bezt++) { /* if only selected keyframes can get their handles shown, * check that keyframe is selected @@ -372,7 +368,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) /* draw handle with appropriate set of colors if selection is ok */ if ((bezt->f2 & SELECT)==sel) { fp= bezt->vec[0]; - + /* only draw first handle if previous segment had handles */ if ( (!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) ) { @@ -382,14 +378,14 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) glVertex2fv(fp); glVertex2fv(fp+3); } - + /* only draw second handle if this segment is bezier */ if (bezt->ipo == BEZT_IPO_BEZ) { UI_GetThemeColor3ubv(basecol + bezt->h2, col); col[3]= drawFCurveFade(fcu) * 255; glColor4ubv((GLubyte *)col); - + glVertex2fv(fp+3); glVertex2fv(fp+6); } } @@ -402,7 +398,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) UI_GetThemeColor3ubv(basecol + bezt->h1, col); col[3]= drawFCurveFade(fcu) * 255; glColor4ubv((GLubyte *)col); - + glVertex2fv(fp); glVertex2fv(fp+3); } -- cgit v1.2.3