diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-07-30 09:04:49 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-07-30 09:04:49 +0400 |
commit | e9fed9bd8c2f18ed56a1ccfa5a3a0da12827c881 (patch) | |
tree | 687123489d8d343212227c864abd55446227a9b0 | |
parent | 387439390d2651c6eaea9deb3ad38a250b579e7b (diff) |
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
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 12 |
1 files changed, 4 insertions, 8 deletions
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); } |