Page MenuHome

frame_reversal_with_extended_strips.txt

Authored By
Shaul Kedem (shul)
Nov 13 2013, 1:06 PM
Size
5 KB
Subscribers
None

frame_reversal_with_extended_strips.txt

Index: source/blender/makesdna/DNA_sequence_types.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/makesdna/DNA_sequence_types.h,v
retrieving revision 1.16
diff -u -b -B -r1.16 DNA_sequence_types.h
--- source/blender/makesdna/DNA_sequence_types.h 24 Mar 2005 09:37:06 -0000 1.16
+++ source/blender/makesdna/DNA_sequence_types.h 16 Sep 2005 17:52:34 -0000
@@ -82,7 +82,7 @@
void (*callback)(void);
} PluginSeq;
-
+/* The sequence structure is the basic struct used by any strip. each of the strips uses a different sequence structure.*/
/* WATCH IT: first part identical to ID (for use in ipo's) */
typedef struct Sequence {
@@ -91,14 +91,14 @@
void *lib;
char name[24];
- short flag, type;
+ short flag, type; /*flags bitmap (see below) and the type of sequence*/
int len;
int start, startofs, endofs;
int startstill, endstill;
int machine, depth;
- int startdisp, enddisp;
+ int startdisp, enddisp; /*starting and ending points in the sequence*/
float mul, handsize;
- int sfra;
+ int sfra; /* starting frame according to the timeline of the scene */
Strip *strip;
StripElem *curelem;
@@ -164,8 +164,9 @@
#define SEQ_FILTERY 16
#define SEQ_MUTE 32
#define SEQ_MAKE_PREMUL 64
+#define SEQ_REVERSE_FRAMES 128
-/* seq->type WATCH IT: BIT 3!!! */
+/* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */
#define SEQ_IMAGE 0
#define SEQ_META 1
#define SEQ_SCENE 2
Index: source/blender/src/drawseq.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawseq.c,v
retrieving revision 1.34
diff -u -b -B -r1.34 drawseq.c
--- source/blender/src/drawseq.c 3 Aug 2005 18:48:21 -0000 1.34
+++ source/blender/src/drawseq.c 16 Sep 2005 17:52:37 -0000
@@ -670,6 +670,7 @@
uiDefButBitS(block, TOG, SEQ_MAKE_PREMUL, SEQ_BUT_RELOAD, "Convert to Premul", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha");
uiDefButBitS(block, TOG, SEQ_FILTERY, SEQ_BUT_RELOAD, "FilterY", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields");
uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Mul:", 10,50,150,19, &last_seq->mul, 0.001, 5.0, 100, 0, "Multiply colors");
+ uiDefButS(block, TOG|BIT|7, SEQ_BUT_RELOAD, "Reverse Frames", 10,30,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Reverse frame order");
}
else if(last_seq->type==SEQ_META) {
@@ -681,7 +682,7 @@
uiDefBut(block, LABEL, 0, "Type: Scene", 10,140,150,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, TEX, B_NOP, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, "");
-
+ uiDefButS(block, TOG|BIT|7, SEQ_BUT_RELOAD, "Reverse Frames", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Reverse frame order");
}
else if(last_seq->type==SEQ_MOVIE) {
@@ -693,6 +694,9 @@
uiDefButBitS(block, TOG, SEQ_MAKE_PREMUL, SEQ_BUT_RELOAD, "Make Premul Alpha ", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha");
uiDefButBitS(block, TOG, SEQ_FILTERY, SEQ_BUT_RELOAD, "FilterY ", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields");
uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Mul:", 10,50,150,19, &last_seq->mul, 0.001, 5.0, 100, 0, "Multiply colors");
+
+ uiDefButS(block, TOG|BIT|7, SEQ_BUT_RELOAD, "Reverse Frames", 10,30,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Reverse frame order");
+
}
else if(last_seq->type==SEQ_SOUND) {
Index: source/blender/src/editseq.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/editseq.c,v
retrieving revision 1.28
diff -u -b -B -r1.28 editseq.c
Index: source/blender/src/sequence.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/sequence.c,v
retrieving revision 1.25
diff -u -b -B -r1.25 sequence.c
--- source/blender/src/sequence.c 14 Jul 2005 13:50:48 -0000 1.25
+++ source/blender/src/sequence.c 16 Sep 2005 17:52:55 -0000
@@ -1710,16 +1710,25 @@
if(se==0) return 0;
if(seq->startdisp >cfra || seq->enddisp <= cfra) return 0;
+ if(seq->flag&SEQ_REVERSE_FRAMES) {
+ /*reverse frame in this sequence */
+ if(cfra <= seq->start) nr= seq->len-1;
+ else if(cfra >= seq->start+seq->len-1) nr= 0;
+ else nr= (seq->start + seq->len) - cfra;
+ } else {
if(cfra <= seq->start) nr= 0;
else if(cfra >= seq->start+seq->len-1) nr= seq->len-1;
else nr= cfra-seq->start;
+ }
+
- se+= nr;
+ se+= nr; /* don't get confused by the increment, this is the same as strip->stripdata[nr], which works on some compilers...*/
se->nr= nr;
return se;
}
+
void set_meta_stripdata(Sequence *seqm)
{
Sequence *seq, *seqim, *seqeff;
@@ -1951,8 +1959,11 @@
doseq= G.scene->r.scemode & R_DOSEQ;
G.scene->r.scemode &= ~R_DOSEQ;
- /* store stuffies */
- oldcfra= CFRA; CFRA= seq->sfra + se->nr;
+ /* store Current FRAme */
+ oldcfra= CFRA;
+
+ CFRA= ( seq->sfra + se->nr );
+
waitcursor(1);
rectot= R.rectot; R.rectot= NULL;

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
77/09/b1a696d77533ca279eb9d751e886

Event Timeline