Page MenuHome

blender_seq_diff.patch

blender_seq_diff.patch

diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/makesdna/DNA_space_types.h source/blender/makesdna/DNA_space_types.h
--- ../../Clean/blender/source/blender/makesdna/DNA_space_types.h 2006-02-05 20:18:55.000000000 +0100
+++ source/blender/makesdna/DNA_space_types.h 2006-03-19 16:58:59.000000000 +0100
@@ -148,6 +148,8 @@
short mainb, zoom;
short chanshown;
short pad2;
+ /* A.G */
+ int flag, redraws;
} SpaceSeq;
@@ -560,11 +562,15 @@
#define TIME_ALL_ANIM_WIN 4
#define TIME_ALL_BUTS_WIN 8
#define TIME_WITH_SEQ_AUDIO 16
+/* A.G. add sequencer only redraw (preformance reasons) */
+#define TIME_SEQ 32
/* sseq->mainb */
#define SEQ_DRAW_SEQUENCE 0
#define SEQ_DRAW_IMG_IMBUF 1
#define SEQ_DRAW_IMG_WAVEFORM 2
#define SEQ_DRAW_IMG_VECTORSCOPE 3
+/* A.G. add time/frame seq */
+#define SEQ_DRAWFRAMES 4
#endif
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/drawipo.c source/blender/src/drawipo.c
--- ../../Clean/blender/source/blender/src/drawipo.c 2006-01-31 00:25:42.000000000 +0100
+++ source/blender/src/drawipo.c 2006-03-20 10:16:26.000000000 +0100
@@ -159,6 +159,13 @@
*step = 1.0;
}
}
+ if(curarea->spacetype==SPACE_SEQ) {
+ SpaceTime *sseq= curarea->spacedata.first;
+ if(sseq->flag & SEQ_DRAWFRAMES) {
+ rem = 1.0;
+ *step = 1.0;
+ }
+ }
if(rem==1.0) (*macht)++; // prevents printing 1.0 2.0 3.0 etc
}
@@ -192,6 +199,15 @@
}
}
+ /*A.G Draw time/frames seq*/
+ if(curarea->spacetype==SPACE_SEQ) {
+ SpaceSeq *sseq= curarea->spacedata.first;
+ if(!(sseq->flag & SEQ_DRAWFRAMES)) {
+ secondgrid= 1;
+ secondiv= 0.01 * (float)G.scene->r.frs_sec;
+ }
+ }
+
space= G.v2d->cur.xmax - G.v2d->cur.xmin;
pixels= G.v2d->mask.xmax-G.v2d->mask.xmin;
@@ -396,6 +412,8 @@
return &((SpaceNla *)sl)->v2d;
if(sl->spacetype==SPACE_TIME)
return &((SpaceTime *)sl)->v2d;
+ if(sl->spacetype==SPACE_SEQ)
+ return &((SpaceSeq *)sl)->v2d;
return NULL;
}
@@ -841,10 +859,16 @@
if(curarea->spacetype==SPACE_OOPS);
else if(curarea->spacetype==SPACE_SEQ) {
- fac2= val/(float)G.scene->r.frs_sec;
- tim= floor(fac2);
- fac2= fac2-tim;
- scroll_prstr(fac, 3.0+(float)(hor.ymin), tim+G.scene->r.frs_sec*fac2/100.0, 'h', disptype);
+ SpaceSeq *sseq= curarea->spacedata.first;
+ if(sseq->flag & SEQ_DRAWFRAMES) {
+ ipomachtx= 1;
+ scroll_prstr(fac, 3.0+(float)(hor.ymin), val, 'h', disptype);
+ } else {
+ fac2= val/(float)G.scene->r.frs_sec;
+ tim= floor(fac2);
+ fac2= fac2-tim;
+ scroll_prstr(fac, 3.0+(float)(hor.ymin), tim+G.scene->r.frs_sec*fac2/100.0, 'h', disptype);
+ }
}
else if (curarea->spacetype==SPACE_SOUND) {
SpaceSound *ssound= curarea->spacedata.first;
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/drawseq.c source/blender/src/drawseq.c
--- ../../Clean/blender/source/blender/src/drawseq.c 2006-03-16 21:42:00.000000000 +0100
+++ source/blender/src/drawseq.c 2006-03-20 10:20:55.000000000 +0100
@@ -750,7 +750,6 @@
calc_sequence(last_seq);
break;
}
-
allqueue(REDRAWSEQ, 0);
}
@@ -784,7 +783,15 @@
uiDefBut(block, varstr->type, SEQ_BUT_PLUGIN, varstr->name, xco,yco,150,19, &(pis->data[a]), varstr->min, varstr->max, 100, 0, varstr->tip);
}
+
}
+ /* A.G set IPO Frame locked for plugins */
+ uiDefButBitS(block, TOG, SEQ_IPO_FRAME_LOCKED,
+ SEQ_BUT_RELOAD, "IPO Frame locked",
+ 10,-40,150,19, &last_seq->flag,
+ 0.0, 1.0, 0, 0,
+ "Lock the IPO coordinates to the "
+ "global frame counter.");
}
else if(last_seq->type==SEQ_IMAGE) {
@@ -1003,7 +1010,7 @@
}
glEnd();
*/
-
+ view2d_do_locks(curarea, V2D_LOCK_COPY);
draw_ipogrid();
draw_cfra_seq();
@@ -1064,8 +1071,10 @@
bwin_scalematrix(sa->win, sseq->blockscale, sseq->blockscale, sseq->blockscale);
seq_blockhandlers(sa);
}
-
+
+ view2d_do_locks(curarea, V2D_LOCK_COPY);
curarea->win_swap= WIN_BACK_OK;
+
}
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/editscreen.c source/blender/src/editscreen.c
--- ../../Clean/blender/source/blender/src/editscreen.c 2006-03-09 13:48:13.000000000 +0100
+++ source/blender/src/editscreen.c 2006-03-18 10:59:11.000000000 +0100
@@ -1071,6 +1071,7 @@
}
if(val & TIME_ALL_ANIM_WIN) allqueue(REDRAWANIM, 0);
if(val & TIME_ALL_BUTS_WIN) allqueue(REDRAWBUTSALL, 0);
+ if(val & TIME_SEQ) allqueue(REDRAWSEQ, 0);
allqueue(REDRAWTIME, 0);
}
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/editseq.c source/blender/src/editseq.c
--- ../../Clean/blender/source/blender/src/editseq.c 2006-03-15 19:16:25.000000000 +0100
+++ source/blender/src/editseq.c 2006-03-19 20:05:25.000000000 +0100
@@ -818,6 +818,43 @@
}
+static void add_movie_and_hda_strip(char *name)
+{
+ SpaceFile *sfile;
+ float x, y;
+ int cfra, machine;
+ short mval[2];
+
+ deselect_all_seq();
+
+ /* restore windowmatrices */
+ areawinset(curarea->win);
+ drawseqspace(curarea, curarea->spacedata.first);
+
+ /* search sfile */
+ sfile= scrarea_find_space_of_type(curarea, SPACE_FILE);
+ if(sfile==0) return;
+
+ /* where will it be */
+ getmouseco_areawin(mval);
+ areamouseco_to_ipoco(G.v2d, mval, &x, &y);
+ cfra= (int)(x+0.5);
+ machine= (int)(y+0.5);
+
+ waitcursor(1);
+
+ /* read directory itself and grab both hdaudio and movie*/
+ sfile_to_hdsnd_sequence(sfile, cfra, machine);
+ sfile_to_mv_sequence(sfile, cfra, machine);
+
+ waitcursor(0);
+
+ BIF_undo_push("Add movie and HD-audio strip Sequencer");
+ transform_seq('g', 0);
+
+}
+
+
static void add_sound_strip_ram(char *name)
{
SpaceFile *sfile;
@@ -1175,8 +1212,11 @@
activate_fileselect(FILE_SPECIAL, "Select Images", last_imagename, add_image_strips);
break;
case 102:
-
- activate_fileselect(FILE_SPECIAL, "Select Movie", last_imagename, add_movie_strip);
+ nr= pupmenu("Load Audio too?%t|Yes%x1|No%x2");
+ if (nr>0) {
+ if(nr==1)activate_fileselect(FILE_SPECIAL, "Select Movie", last_imagename, add_movie_and_hda_strip);
+ else activate_fileselect(FILE_SPECIAL, "Select Movie", last_imagename, add_movie_strip);
+ }
break;
case 101:
/* new menu: */
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/edittime.c source/blender/src/edittime.c
--- ../../Clean/blender/source/blender/src/edittime.c 2006-01-28 19:33:18.000000000 +0100
+++ source/blender/src/edittime.c 2006-03-18 11:09:44.000000000 +0100
@@ -484,6 +484,10 @@
else if(sa->spacetype==SPACE_BUTS) {
if(val & TIME_ALL_BUTS_WIN) dodraw= 1;
}
+ // A.G Add seq only redraw
+ else if(sa->spacetype==SPACE_SEQ) {
+ if(val & TIME_SEQ) dodraw= 1;
+ }
else if(sa->spacetype==SPACE_TIME) dodraw= 2;
if(dodraw) {
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/header_seq.c source/blender/src/header_seq.c
--- ../../Clean/blender/source/blender/src/header_seq.c 2006-02-05 20:30:37.000000000 +0100
+++ source/blender/src/header_seq.c 2006-03-20 10:23:58.000000000 +0100
@@ -72,6 +72,7 @@
static void do_seq_viewmenu(void *arg, int event)
{
extern int play_anim(int mode);
+ SpaceSeq *sseq= curarea->spacedata.first;
switch(event)
{
@@ -92,6 +93,18 @@
update_for_newframe();
}
break;
+
+ /* A.G Lock Time */
+ case 5:
+ G.v2d->flag ^= V2D_VIEWLOCK;
+ if(G.v2d->flag & V2D_VIEWLOCK)
+ view2d_do_locks(curarea, 0);
+ break;
+
+ /* A.G Draw time/frames */
+ case 6: /* show time or frames */
+ sseq->flag ^= SEQ_DRAWFRAMES;
+ break;
}
}
@@ -99,6 +112,7 @@
{
uiBlock *block;
short yco= 0, menuwidth=120;
+ SpaceSeq *sseq= curarea->spacedata.first;
block= uiNewBlock(&curarea->uiblocks, "seq_viewmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
uiBlockSetButmFunc(block, do_seq_viewmenu, NULL);
@@ -113,6 +127,18 @@
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View Selected|NumPad .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ /* A.G Lock Time */
+ uiDefIconTextBut(block, BUTM, 1, (G.v2d->flag & V2D_VIEWLOCK)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
+ "Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
+
+ /* A.G Draw time or frames.*/
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if(sseq->flag & SEQ_DRAWFRAMES)
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+ else
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
if(!curarea->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,0, "");
else uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
@@ -414,6 +440,7 @@
case B_SEQHOME:
G.v2d->cur= G.v2d->tot;
test_view2d(G.v2d, curarea->winx, curarea->winy);
+ view2d_do_locks(curarea, V2D_LOCK_COPY);
scrarea_queue_winredraw(curarea);
break;
case B_SEQCLEAR:
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/header_time.c source/blender/src/header_time.c
--- ../../Clean/blender/source/blender/src/header_time.c 2006-02-05 20:30:37.000000000 +0100
+++ source/blender/src/header_time.c 2006-03-20 10:25:30.000000000 +0100
@@ -154,6 +154,11 @@
else icon= ICON_CHECKBOX_DEHLT;
uiDefIconTextBut(block, BUTM, 1, icon, "Buttons Windows", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, TIME_ALL_BUTS_WIN, "");
+ /*A.G Add sequencer only redraw*/
+ if(stime->redraws & TIME_SEQ) icon= ICON_CHECKBOX_HLT;
+ else icon= ICON_CHECKBOX_DEHLT;
+ uiDefIconTextBut(block, BUTM, 1, icon, "Sequencer Windows", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, TIME_SEQ, "");
+
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
sprintf(str, "Set Frames/Sec (%d)", G.scene->r.frs_sec);
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean/blender/source/blender/src/space.c source/blender/src/space.c
--- ../../Clean/blender/source/blender/src/space.c 2006-03-08 18:45:32.000000000 +0100
+++ source/blender/src/space.c 2006-03-19 19:40:55.000000000 +0100
@@ -3536,7 +3536,7 @@
extern Sequence *last_seq;
float dx, dy;
int doredraw= 0, cfra, first;
- short mval[2];
+ short mval[2], nr;
short mousebut = L_MOUSE;
if(curarea->win==0) return;
@@ -3730,10 +3730,18 @@
if((G.qual==LR_SHIFTKEY))
seq_snap_menu();
break;
- case TKEY:
+ case PKEY:
if((G.qual==0))
touch_seq_files();
break;
+ case TKEY: /* popup menu */
+ nr= pupmenu("Time value%t|Frames %x1|Seconds%x2");
+ if (nr>0) {
+ if(nr==1) sseq->flag |= SEQ_DRAWFRAMES;
+ else sseq->flag &= ~SEQ_DRAWFRAMES;
+ doredraw= 1;
+ }
+ break;
case XKEY:
case DELKEY:
if(G.qual==0) {

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3b/38/7cd7a9ebb3de7a9cb6becbcdcd8f

Event Timeline