Page Menu
Home
Search
Configure Global Search
Log In
Files
F4732
parche.txt
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
David Millán Escrivá (damiles)
Nov 13 2013, 1:18 PM
Size
1 KB
Subscribers
None
parche.txt
View Options
Index: source/blender/src/drawseq.c
===================================================================
--- source/blender/src/drawseq.c (revisión: 12274)
+++ 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,44 @@
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, float x1, float y1, float x2, float y2)
+{
+ int j;
+ float width, height, width_key=1.0f;
+ char col[3];
+ Ipo* i= seq->ipo;
+ ListBase ic= i->curve;
+ IpoCurve* ipc= ic.first;
+ col[0]= col[1]= col[2]= 1.0f;
+ width= x2-x1;
+ height= y2-y1;
+ width_key=0.75f*height*0.5f;
+
+ BezTriple* 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;
+ //glShadeModel(GL_SMOOTH);
+ glBegin(GL_POLYGON);
+ glColor3ubv((GLubyte *)col);
+ glVertex2f(x, y-width_key);
+ glVertex2f(x-width_key, y);
+ glVertex2f(x, y+width_key);
+ glVertex2f(x+width_key, y);
+ glEnd();
+
+
+ }
+ 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 +749,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, x1, y1,x2, y2);
/* draw additional info and controls */
if (seq->type == SEQ_RAM_SOUND)
drawseqwave(seq, x1, y1, x2, y2, sa->winx);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
04/57/46edb5e7255f7fa566054fc472ec
Event Timeline
Log In to Comment