Page MenuHome

blender_seq_diff_ver2.patch

blender_seq_diff_ver2.patch

diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean_deb/blender/source/blender/blenkernel/intern/ipo.c source/blender/blenkernel/intern/ipo.c
--- ../../Clean_deb/blender/source/blender/blenkernel/intern/ipo.c 2006-03-24 13:24:58.000000000 +0100
+++ source/blender/blenkernel/intern/ipo.c 2006-03-25 12:55:10.000000000 +0100
@@ -216,8 +216,8 @@
}
/* on adding new ipos, or for empty views */
-void ipo_default_v2d_cur(int blocktype, rctf *cur)
-{
+void ipo_default_v2d_cur(int blocktype, rctf *cur){
+
if(blocktype==ID_CA) {
cur->xmin= G.scene->r.sfra;
cur->xmax= G.scene->r.efra;
@@ -237,10 +237,36 @@
cur->ymax= (float)+1.1;
}
else if(blocktype==ID_SEQ) {
- cur->xmin= -5.0+G.scene->r.sfra;
- cur->xmax= 105.0;
- cur->ymin= (float)-0.1;
- cur->ymax= (float)+1.1;
+ /* Adjust IPO window to sequence and avoid annoying snap-back to startframe when Lock Time is on */
+ extern Sequence *last_seq;
+
+ if(G.v2d->flag & V2D_VIEWLOCK){
+ float start, end;
+ start = last_seq->startdisp;
+ end = last_seq->enddisp;
+ /* should this not be the way to get the flag? */
+ if((last_seq->flag & SEQ_IPO_FRAME_LOCKED) != 0){
+ /*display ipo == seq*/
+ cur->xmin= -5.0+start;
+ cur->xmax= 5.0+end;
+ cur->ymin= (float)-0.1;
+ cur->ymax= (float)+1.1;
+ }
+ else {
+ /*display scene startframe - endframe*/
+ cur->xmin= (float)G.scene->r.sfra-0.1;;
+ cur->xmax= G.scene->r.efra;
+ cur->ymin= (float)-0.1;
+ cur->ymax= (float)+1.1;
+ }
+ }
+ else {
+ /*default behaviour frames 1-100*/
+ cur->xmin= -5.0+G.scene->r.sfra;
+ cur->xmax= 105.0;
+ cur->ymin= (float)-0.1;
+ cur->ymax= (float)+1.1;
+ }
}
else if(blocktype==ID_KE) {
cur->xmin= (float)G.scene->r.sfra-0.1;
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean_deb/blender/source/blender/makesdna/DNA_space_types.h source/blender/makesdna/DNA_space_types.h
--- ../../Clean_deb/blender/source/blender/makesdna/DNA_space_types.h 2006-03-24 13:24:58.000000000 +0100
+++ source/blender/makesdna/DNA_space_types.h 2006-03-24 13:14:19.000000000 +0100
@@ -148,6 +148,7 @@
short mainb, zoom;
short chanshown;
short pad2;
+ int flag, redraws;
} SpaceSeq;
@@ -560,11 +561,15 @@
#define TIME_ALL_ANIM_WIN 4
#define TIME_ALL_BUTS_WIN 8
#define TIME_WITH_SEQ_AUDIO 16
+/* 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
+/* time/frame seq */
+#define SEQ_DRAWFRAMES 4
#endif
diff -x '.#*' -x CVS -x Makefile -x 'nan_*' -x '*~' -u -r ../../Clean_deb/blender/source/blender/src/drawipo.c source/blender/src/drawipo.c
--- ../../Clean_deb/blender/source/blender/src/drawipo.c 2006-03-24 13:24:58.000000000 +0100
+++ source/blender/src/drawipo.c 2006-03-24 13:10:29.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 @@
}
}
+ /*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;
@@ -311,9 +327,30 @@
/* Limits box */
if(curarea->spacetype==SPACE_IPO) {
if(G.sipo->blocktype==ID_SEQ) {
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glRectf(0.0, 0.0, 100.0, 1.0);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ extern Sequence *last_seq;
+ /* Draw Limits box in relation to sequence if ipo frame is locked*/
+ if (last_seq){
+ if((last_seq->flag & SEQ_IPO_FRAME_LOCKED) != 0){
+ float start, end;
+ start = last_seq->startdisp;
+ end = last_seq->enddisp;
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glRectf(start, 0.0, end, 1.0);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ }
+ else {
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glRectf(0.0, 0.0, 100.0, 1.0);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ }
+
+ }
+
+ else {
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glRectf(0.0, 0.0, 100.0, 1.0);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ }
}
else if(ELEM(G.sipo->blocktype, ID_CU, ID_CO)) {
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
@@ -396,6 +433,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 +880,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_deb/blender/source/blender/src/drawseq.c source/blender/src/drawseq.c
--- ../../Clean_deb/blender/source/blender/src/drawseq.c 2006-03-24 13:24:58.000000000 +0100
+++ source/blender/src/drawseq.c 2006-03-24 13:11:03.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);
}
+
}
+ /* 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();
*/
-
+
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_deb/blender/source/blender/src/editscreen.c source/blender/src/editscreen.c
--- ../../Clean_deb/blender/source/blender/src/editscreen.c 2006-03-24 13:24:58.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_deb/blender/source/blender/src/editseq.c source/blender/src/editseq.c
--- ../../Clean_deb/blender/source/blender/src/editseq.c 2006-03-24 13:24:58.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_deb/blender/source/blender/src/edittime.c source/blender/src/edittime.c
--- ../../Clean_deb/blender/source/blender/src/edittime.c 2006-03-24 13:24:58.000000000 +0100
+++ source/blender/src/edittime.c 2006-03-24 13:17:03.000000000 +0100
@@ -484,6 +484,10 @@
else if(sa->spacetype==SPACE_BUTS) {
if(val & TIME_ALL_BUTS_WIN) dodraw= 1;
}
+ /* 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_deb/blender/source/blender/src/header_seq.c source/blender/src/header_seq.c
--- ../../Clean_deb/blender/source/blender/src/header_seq.c 2006-03-24 13:24:58.000000000 +0100
+++ source/blender/src/header_seq.c 2006-03-24 13:11:45.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;
+
+ /* Lock Time */
+ case 5:
+ G.v2d->flag ^= V2D_VIEWLOCK;
+ if(G.v2d->flag & V2D_VIEWLOCK)
+ view2d_do_locks(curarea, 0);
+ break;
+
+ /* 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, "");
+
+ /* 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, "");
+
+ /* 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_deb/blender/source/blender/src/header_time.c source/blender/src/header_time.c
--- ../../Clean_deb/blender/source/blender/src/header_time.c 2006-03-24 13:24:58.000000000 +0100
+++ source/blender/src/header_time.c 2006-03-24 13:23:00.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, "");
+ /* 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_deb/blender/source/blender/src/space.c source/blender/src/space.c
--- ../../Clean_deb/blender/source/blender/src/space.c 2006-03-25 08:18:58.000000000 +0100
+++ source/blender/src/space.c 2006-03-25 08:19:15.000000000 +0100
@@ -3540,7 +3540,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;
@@ -3734,10 +3734,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
fb/c3/fd9f4126663a814d268ca686a0c8

Event Timeline