Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2007-12-26 22:30:49 +0300
committerPeter Schlaile <peter@schlaile.de>2007-12-26 22:30:49 +0300
commit6d13d4473418be180a345df4fb4375f03e7e256c (patch)
tree7a54bb10005bbfd90666b8cb8b8b646ea6b3dc5e /source/blender/src/sequence.c
parente06edeb801b70adbc1d4b98474e7c5d6a930b7b3 (diff)
== 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.
Diffstat (limited to 'source/blender/src/sequence.c')
-rw-r--r--source/blender/src/sequence.c61
1 files changed, 58 insertions, 3 deletions
diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c
index 5faffb38107..3d7ac3021a1 100644
--- a/source/blender/src/sequence.c
+++ b/source/blender/src/sequence.c
@@ -132,7 +132,10 @@ void free_strip(Strip *strip)
void new_tstripdata(Sequence *seq)
{
if(seq->strip) {
- free_tstripdata(seq->strip->len, seq->strip->tstripdata);
+ if (seq->strip->tstripdata) {
+ free_tstripdata(seq->strip->len,
+ seq->strip->tstripdata);
+ }
seq->strip->tstripdata= 0;
seq->strip->len= seq->len;
}
@@ -372,6 +375,58 @@ void calc_sequence(Sequence *seq)
}
}
+void reload_sequence_new_file(Sequence * seq)
+{
+ char str[FILE_MAXDIR+FILE_MAXFILE];
+
+ if (!(seq->type == SEQ_MOVIE || seq->type == SEQ_IMAGE ||
+ seq->type == SEQ_HD_SOUND)) {
+ return;
+ }
+
+ new_tstripdata(seq);
+
+ if (seq->type == SEQ_IMAGE) {
+ return;
+ }
+
+ strncpy(str, seq->strip->dir, FILE_MAXDIR-1);
+ strncat(str, seq->strip->stripdata->name, FILE_MAXFILE-1);
+
+ if (seq->type == SEQ_MOVIE) {
+ if(seq->anim) IMB_free_anim(seq->anim);
+ seq->anim = openanim(str, IB_rect);
+
+ if (!seq->anim) {
+ return;
+ }
+
+ seq->len = IMB_anim_get_duration(seq->anim);
+
+ seq->anim_preseek = IMB_anim_get_preseek(seq->anim);
+
+ seq->len -= seq->anim_startofs;
+ seq->len -= seq->anim_endofs;
+ if (seq->len < 0) {
+ seq->len = 0;
+ }
+ seq->strip->len = seq->len;
+ } else if (seq->type == SEQ_HD_SOUND) {
+ if(seq->hdaudio) sound_close_hdaudio(seq->hdaudio);
+ seq->hdaudio = sound_open_hdaudio(str);
+
+ if (!seq->hdaudio) {
+ return;
+ }
+
+ seq->strip->len = seq->len
+ = sound_hdaudio_get_duration(seq->hdaudio, FPS);
+ }
+
+
+ calc_sequence(seq);
+}
+
void sort_seq()
{
/* all strips together per kind, and in order of y location ("machine") */
@@ -685,7 +740,7 @@ StripElem *give_stripelem(Sequence *seq, int cfra)
if (nr == -1) return 0;
if (se == 0) return 0;
- se += nr;
+ se += nr + seq->anim_startofs;
return se;
}
@@ -991,7 +1046,7 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra)
}
if(seq->anim) {
IMB_anim_set_preseek(seq->anim, seq->anim_preseek);
- se->ibuf = IMB_anim_absolute(seq->anim, se->nr);
+ se->ibuf = IMB_anim_absolute(seq->anim, se->nr + seq->anim_startofs);
}
if(se->ibuf == 0) {