[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13010] trunk/blender/source/blender: == Sequencer ==

Peter Schlaile peter at schlaile.de
Wed Dec 26 20:30:50 CET 2007


Revision: 13010
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13010
Author:   schlaile
Date:     2007-12-26 20:30:49 +0100 (Wed, 26 Dec 2007)

Log Message:
-----------
== Sequencer ==

Moved status info bar into panels. It was always shown on the wrong place...
Added anim-startofs and anim-endofs, so that one can specify the range of 
_input_ that should be used. 

There is a subtle difference to start-ofs and end-ofs,
which will show, when you use "Reverse Frames" or "Speed Control". Both
effects operate on the input-range and _not_ on the display range! Now
you can control both in a comfortable way. Only thing missing: a button
to copy start-ofs and end-ofs to anim-startofs and anim-endofs.
(Andy: that was the feature you missed, when storyboarding with the sequencer
and the speed control effect :)

Also: added File-Name and Dir-Name to redirect input as needed.

Modified Paths:
--------------
    trunk/blender/source/blender/include/BSE_sequence.h
    trunk/blender/source/blender/include/butspace.h
    trunk/blender/source/blender/makesdna/DNA_sequence_types.h
    trunk/blender/source/blender/src/buttons_scene.c
    trunk/blender/source/blender/src/drawseq.c
    trunk/blender/source/blender/src/sequence.c

Modified: trunk/blender/source/blender/include/BSE_sequence.h
===================================================================
--- trunk/blender/source/blender/include/BSE_sequence.h	2007-12-26 19:19:51 UTC (rev 13009)
+++ trunk/blender/source/blender/include/BSE_sequence.h	2007-12-26 19:30:49 UTC (rev 13010)
@@ -60,6 +60,7 @@
 void free_editing(struct Editing *ed);
 void calc_sequence(struct Sequence *seq);
 void calc_sequence_disp(struct Sequence *seq);
+void reload_sequence_new_file(struct Sequence * seq);
 void sort_seq(void);
 void clear_scene_in_allseqs(struct Scene *sce);
 

Modified: trunk/blender/source/blender/include/butspace.h
===================================================================
--- trunk/blender/source/blender/include/butspace.h	2007-12-26 19:19:51 UTC (rev 13009)
+++ trunk/blender/source/blender/include/butspace.h	2007-12-26 19:30:49 UTC (rev 13010)
@@ -355,6 +355,7 @@
 #define B_SEQ_BUT_EFFECT	1693
 #define B_SEQ_BUT_RELOAD_ALL    1694
 #define B_SEQ_BUT_TRANSFORM     1695
+#define B_SEQ_BUT_RELOAD_FILE   1696
 
 /* *********************** */
 #define B_ARMATUREBUTS		1800

Modified: trunk/blender/source/blender/makesdna/DNA_sequence_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_sequence_types.h	2007-12-26 19:19:51 UTC (rev 13009)
+++ trunk/blender/source/blender/makesdna/DNA_sequence_types.h	2007-12-26 19:30:49 UTC (rev 13010)
@@ -119,7 +119,6 @@
 	char name[24]; /* name, not set by default and dosnt need to be unique as with ID's */
 
 	int flag, type;	/*flags bitmap (see below) and the type of sequence*/
-	int pad;
 	int len; /* the length of the contense of this strip - before handles are applied */
 	int start, startofs, endofs;
 	int startstill, endstill;
@@ -128,6 +127,7 @@
 	float mul, handsize;
 					/* is sfra needed anymore? - it looks like its only used in one place */
 	int sfra;		/* starting frame according to the timeline of the scene. */
+	int anim_preseek;
 
 	Strip *strip;
 
@@ -151,10 +151,11 @@
 
 	void *effectdata;	/* Struct pointer for effect settings */
 
-	int anim_preseek;
+	int anim_startofs;    /* only use part of animation file */
+	int anim_endofs;      /* is subtle different to startofs / endofs */
+
 	int blend_mode;
 	float blend_opacity;
-	int pad2;
 } Sequence;
 
 typedef struct MetaStack {

Modified: trunk/blender/source/blender/src/buttons_scene.c
===================================================================
--- trunk/blender/source/blender/src/buttons_scene.c	2007-12-26 19:19:51 UTC (rev 13009)
+++ trunk/blender/source/blender/src/buttons_scene.c	2007-12-26 19:30:49 UTC (rev 13010)
@@ -500,6 +500,10 @@
 			       "Snd RAM", "Snd HD",
 			       "", "Effect" };
 	uiBlock *block;
+	static char strdata[1024];
+	char * str = strdata;
+	char * p;
+	int yco;
 
 	block = uiNewBlock(&curarea->uiblocks, "seq_panel_editing", 
 			   UI_EMBOSS, UI_HELV, curarea->win);
@@ -578,6 +582,90 @@
 				  0.0, last_seq->len, 0.0, 0.0, "End offset");
 		}
 	}
+
+
+	if(last_seq->type & SEQ_EFFECT)
+		sprintf(str, "Len: %d\nFrom %d - %d\n", last_seq->len, last_seq->startdisp, last_seq->enddisp-1);
+	else
+		sprintf(str, "Len: %d(%d)\n", last_seq->enddisp-last_seq->startdisp, last_seq->len);
+
+	str += strlen(str);
+
+	if(last_seq->type==SEQ_IMAGE) {
+		if (last_seq->len > 1) {
+			/* CURRENT */
+			StripElem * se= give_stripelem(last_seq, CFRA);
+			StripElem * last;
+
+			/* FIRST AND LAST */
+	
+			if(last_seq->strip) {
+				se= last_seq->strip->stripdata;
+				last= se+last_seq->len-1;
+				if(last_seq->startofs) se+= last_seq->startofs;
+				if(last_seq->endofs) last-= last_seq->endofs;
+	
+				sprintf(str, "First: %s at %d\nLast: %s at %d\n", se->name, last_seq->startdisp, last->name, last_seq->enddisp-1);
+			}
+		} else { /* single image */
+			if (last_seq->strip) {
+				sprintf(str, "Len: %d\n", last_seq->enddisp-last_seq->startdisp);
+			}
+		}
+
+		str += strlen(str);
+
+		/* orig size */
+		if(last_seq->strip) {
+			sprintf(str, "OrigSize: %d x %d\n", last_seq->strip->orx, last_seq->strip->ory);
+		}
+	}
+	else if(last_seq->type==SEQ_MOVIE) {
+		int sta= last_seq->startofs;
+		int end= last_seq->len-1-last_seq->endofs;
+
+		sprintf(str, "First: %d at %d\nLast: %d at %d\nCur: %d\n",
+			sta, last_seq->startdisp, end, last_seq->enddisp-1,  
+			(G.scene->r.cfra)-last_seq->startdisp);
+	}
+	else if(last_seq->type==SEQ_SCENE) {
+		TStripElem * se= give_tstripelem(last_seq,  (G.scene->r.cfra));
+		if(se && last_seq->scene) {
+			sprintf(str, "First: %d\nLast: %d\nCur: %d\n", last_seq->sfra+se->nr, last_seq->sfra, last_seq->sfra+last_seq->len-1); 
+		}
+	}
+	else if(last_seq->type==SEQ_RAM_SOUND
+		|| last_seq->type == SEQ_HD_SOUND) {
+
+		int sta= last_seq->startofs;
+		int end= last_seq->len-1-last_seq->endofs;
+
+		sprintf(str, "First: %d at %d\nLast: %d at %d\nCur: %d\n",
+			sta, last_seq->startdisp, end, last_seq->enddisp-1,  
+			(G.scene->r.cfra)-last_seq->startdisp);
+	}
+	else if(last_seq->type == SEQ_SPEED) {
+		SpeedControlVars * vars = 
+			(SpeedControlVars*) last_seq->effectdata;
+
+		if (vars) {
+			sprintf(str, "Last mapped frame: %d at %d\n", 
+				vars->lastValidFrame, 
+				vars->lastValidFrame 
+				+ last_seq->startdisp);
+		}
+	}
+
+	str = strdata;
+	yco = 40;
+
+	while ((p = strchr(str, '\n'))) {
+		*p = 0;
+		uiDefBut(block, LABEL, 0, str, 10,yco,240,19, 0, 
+			 0, 0, 0, 0, "");
+		str = p+1;
+		yco -= 20;
+	}
 }
 
 static void seq_panel_input()
@@ -590,7 +678,30 @@
 	if(uiNewPanel(curarea, block, "Input", "Sequencer", 
 		      10, 230, 318, 204) == 0) return;
 
-	
+	uiDefBut(block, TEX, 
+		 B_SEQ_BUT_RELOAD_FILE, "Dir: ", 
+		 10,140,240,19, last_seq->strip->dir, 
+		 0.0, 160.0, 100, 0, "");
+
+	if (last_seq->type == SEQ_IMAGE) {
+		StripElem * se = give_stripelem(last_seq, CFRA);
+
+		if (se) {
+			uiDefBut(block, TEX, 
+				 B_SEQ_BUT_RELOAD_FILE, "File: ", 
+				 10, 120, 240,19, se->name, 
+				 0.0, 80.0, 100, 0, "");
+		}
+
+	} else if (last_seq->type == SEQ_MOVIE || 
+		   last_seq->type == SEQ_HD_SOUND ||
+		   last_seq->type == SEQ_RAM_SOUND) {
+		uiDefBut(block, TEX, 
+			 B_SEQ_BUT_RELOAD_FILE, "File: ", 
+			 10,120,240,19, last_seq->strip->stripdata->name, 
+			 0.0, 80.0, 100, 0, "");
+	}
+
 	uiDefButBitI(block, TOG, SEQ_USE_CROP,
 		     B_SEQ_BUT_RELOAD, "Use Crop",
 		     10,100,240,19, &last_seq->flag,
@@ -645,8 +756,18 @@
 	}
 
 	
-	uiDefButI(block, NUM, B_SEQ_BUT_RELOAD, "Preseek:",
-		  10,0,150,19, &last_seq->anim_preseek, 
+	uiDefButI(block, NUM, 
+		  B_SEQ_BUT_RELOAD_FILE, "A-Start", 
+		  10, 0, 120, 20, &last_seq->anim_startofs, 
+		  0.0, MAXFRAMEF, 0.0, 0.0, "Animation start offset in file");
+	uiDefButI(block, NUM, 
+		  B_SEQ_BUT_RELOAD_FILE, "A-End", 
+		  130, 0, 120, 20, &last_seq->anim_endofs, 
+		  0.0, MAXFRAMEF, 0.0, 0.0, "Animation end offset in file");
+
+
+	uiDefButI(block, NUM, B_SEQ_BUT_RELOAD, "MPEG-Preseek:",
+		  10, -20, 240,19, &last_seq->anim_preseek, 
 		  0.0, 50.0, 100,0,"On MPEG-seeking preseek this many frames");
 
 }
@@ -948,7 +1069,9 @@
 	case B_SEQ_BUT_EFFECT:
 		update_changed_seq_and_deps(last_seq, 0, 1);
 		break;
-
+	case B_SEQ_BUT_RELOAD_FILE:
+		reload_sequence_new_file(last_seq);
+		break;
 	case B_SEQ_BUT_RELOAD:
 	case B_SEQ_BUT_RELOAD_ALL:
 		update_seq_ipo_rect(last_seq);

Modified: trunk/blender/source/blender/src/drawseq.c
===================================================================
--- trunk/blender/source/blender/src/drawseq.c	2007-12-26 19:19:51 UTC (rev 13009)
+++ trunk/blender/source/blender/src/drawseq.c	2007-12-26 19:30:49 UTC (rev 13010)
@@ -861,143 +861,6 @@
 	sa->win_swap= WIN_BACK_OK;
 }
 
-static void draw_extra_seqinfo(void)
-{
-	Sequence *last_seq = get_last_seq();
-	StripElem *se, *last;
-	float xco, xfac, yco, yfac;
-	int sta, end;
-	char str[256];
-
-	if(last_seq==0) return;
-
-	/* xfac: size of 1 pixel */
-	xfac= G.v2d->cur.xmax - G.v2d->cur.xmin;
-	xfac/= (float)(G.v2d->mask.xmax-G.v2d->mask.xmin);
-	xco= G.v2d->cur.xmin+10*xfac;
-
-	yfac= G.v2d->cur.ymax - G.v2d->cur.ymin;
-	yfac/= (float)(G.v2d->mask.ymax-G.v2d->mask.ymin);
-	yco= G.v2d->cur.ymin+40*yfac;
-	
-	BIF_ThemeColor(TH_TEXT_HI);
-
-	/* NAME */
-	glRasterPos3f(xco,  yco, 0.0);
-	strncpy(str, give_seqname(last_seq), 255);
-	BMF_DrawString(G.font, str);
-	xco += xfac*BMF_GetStringWidth(G.font, str) +10.0*xfac;
-
-	if(last_seq->type==SEQ_SCENE && last_seq->scene) {
-		glRasterPos3f(xco,  yco, 0.0);
-		BMF_DrawString(G.font, last_seq->scene->id.name+2);
-		xco += xfac*BMF_GetStringWidth(G.font, last_seq->scene->id.name+2) +30.0*xfac;
-	}
-
-	/* LEN, dont bother with single images */
-	if (check_single_seq(last_seq)==0) {
-		if(last_seq->type & SEQ_EFFECT)
-			sprintf(str, "len: %d   From %d - %d", last_seq->len, last_seq->startdisp, last_seq->enddisp-1);
-		else
-			sprintf(str, "len: %d (%d)", last_seq->enddisp-last_seq->startdisp, last_seq->len);
-		
-		glRasterPos3f(xco,  yco, 0.0);
-	
-		BMF_DrawString(G.font, str);
-		xco += xfac*BMF_GetStringWidth(G.font, str) +10.0*xfac;
-	}
-
-
-	if(last_seq->type==SEQ_IMAGE) {
-		if (last_seq->len > 1) {
-			/* CURRENT */
-			se= give_stripelem(last_seq,  (G.scene->r.cfra));
-			if(se) {
-				sprintf(str, "Cur: %s%s", last_seq->strip->dir, se->name);
-				glRasterPos3f(xco,  yco, 0.0);
-				BMF_DrawString(G.font, str);
-				xco += xfac*BMF_GetStringWidth(G.font, str) +10.0*xfac;
-			}
-	
-			/* FIRST AND LAST */
-	
-			if(last_seq->strip) {
-				se= last_seq->strip->stripdata;
-				last= se+last_seq->len-1;
-				if(last_seq->startofs) se+= last_seq->startofs;
-				if(last_seq->endofs) last-= last_seq->endofs;
-	
-				sprintf(str, "First: %s at %d   Last: %s at %d", se->name, last_seq->startdisp, last->name, last_seq->enddisp-1);
-				glRasterPos3f(xco,  yco, 0.0);
-				BMF_DrawString(G.font, str);
-				xco += xfac*BMF_GetStringWidth(G.font, str) +30.0*xfac;
-			}
-		} else { /* single image */
-			if (last_seq->strip) {
-				sprintf(str, "Single: %s%s   len: %d", last_seq->strip->dir, last_seq->strip->stripdata->name, last_seq->enddisp-last_seq->startdisp);
-				glRasterPos3f(xco,  yco, 0.0);
-				BMF_DrawString(G.font, str);
-				xco += xfac*BMF_GetStringWidth(G.font, str) +30.0*xfac;
-			}
-		}
-		/* orig size */
-		if(last_seq->strip) {
-			sprintf(str, "OrigSize: %d x %d", last_seq->strip->orx, last_seq->strip->ory);
-			glRasterPos3f(xco,  yco, 0.0);
-			BMF_DrawString(G.font, str);
-			xco += xfac*BMF_GetStringWidth(G.font, str) +30.0*xfac;
-		}
-	}
-	else if(last_seq->type==SEQ_MOVIE) {
-

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list