Index: source/blender/src/drawseq.c =================================================================== --- source/blender/src/drawseq.c (revisión: 12312) +++ source/blender/src/drawseq.c (copia de trabajo) @@ -52,6 +52,8 @@ #include "DNA_space_types.h" #include "DNA_view2d_types.h" #include "DNA_userdef_types.h" +#include "DNA_ipo_types.h" +#include "DNA_curve_types.h" #include "BKE_global.h" #include "BKE_plugin_types.h" @@ -630,7 +632,38 @@ glRasterPos3f(x1, y1+SEQ_STRIP_OFSBOTTOM, 0.0); BMF_DrawString(G.font, strp); } - +/* draws a keyframes of this strip */ +static void draw_keyframestrip(Sequence *seq,char *col, float x1, float y1, float x2, float y2) +{ + int j; + float width, height; + BezTriple* bt; + Ipo* i= seq->ipo; + ListBase ic= i->curve; + IpoCurve* ipc= ic.first; + width= x2-x1; + height= y2-y1; + bt=ipc->bezt; + for(j= 0; j< ipc->totvert; j++){ + float x,y, perc; + perc= bt->vec[1][0]/100.0f; + if((perc < 1.0f) && (perc > 0.0f)){ + x= width * perc + x1; + y= y1 + height * 0.5f; + setlinestyle(0); + if(seq->flag && SELECT) + glColor3ub(255,255,255); + else + glColor3ubv((GLubyte *)col); + glBegin(GL_LINES); + glVertex2f(x, y1); + glVertex2f(x, y2); + glEnd(); + setlinestyle(0); + } + bt++; + } +} /* draws a shaded strip, made from gradient + flat color + gradient */ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float x2, float y2) { @@ -710,7 +743,8 @@ draw_shadedstrip(seq, col, seq_tx_get_final_left(seq), y1, seq_tx_get_final_right(seq), y2); else /* normal operation */ draw_shadedstrip(seq, col, x1, y1, x2, y2); - + if (seq->ipo) + draw_keyframestrip(seq, col, x1, y1,x2, y2); /* draw additional info and controls */ if (seq->type == SEQ_RAM_SOUND) drawseqwave(seq, x1, y1, x2, y2, sa->winx);