[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28412] trunk/blender/source/blender: == Sequencer ==
Peter Schlaile
peter at schlaile.de
Sun Apr 25 14:53:39 CEST 2010
Revision: 28412
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28412
Author: schlaile
Date: 2010-04-25 14:53:39 +0200 (Sun, 25 Apr 2010)
Log Message:
-----------
== Sequencer ==
This adds MULTICAM-editing support for blender. (Well, the beginning of.)
There is now a new effect track, named MULTICAM, which just selects
one of the lower tracks.
Doesn't sound that exciting, but if you combine this with A/B-Trim (moving
split points of two directly connected tracks around, while magically
resizing both strips, something to be added), you just do:
* add several tracks for your camera angles
* (optionally) sync those tracks
* add one multicam track on top
Use that multicam-track to edit your movie. (Either using fcurves on the
multicam source selector or using knife-tool and A/B-Trim.)
Compare that to:
* add several tracks
* add cross fades between them
* do some python scripting to add several fcurves to make that beast
somewhat work.
* cry out loud, using it, if you have to move cut points around
Alternatively, even harder:
* just edit the old way and put strip after strip
You might think, that this isn't really helpfull for animators, but
consider using scene-strips (in OpenGL-mode) for input, that are set for
different camera angles and can now be intercut a lot more easily...
Also: small fix on the way: the speed effect can now be used in cascade.
(Don't know, if anyone used it that way, but now it works.)
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/BKE_sequencer.h
trunk/blender/source/blender/blenkernel/intern/seqeffects.c
trunk/blender/source/blender/blenkernel/intern/sequencer.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
trunk/blender/source/blender/makesdna/DNA_sequence_types.h
trunk/blender/source/blender/makesrna/RNA_access.h
trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
Modified: trunk/blender/source/blender/blenkernel/BKE_sequencer.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_sequencer.h 2010-04-25 10:49:13 UTC (rev 28411)
+++ trunk/blender/source/blender/blenkernel/BKE_sequencer.h 2010-04-25 12:53:39 UTC (rev 28412)
@@ -112,22 +112,22 @@
/* stores the y-range of the effect IPO */
void (*store_icu_yrange)(struct Sequence * seq,
- short adrcode, float *ymin, float *ymax);
+ short adrcode, float *ymin, float *ymax);
/* stores the default facf0 and facf1 if no IPO is present */
void (*get_default_fac)(struct Sequence *seq, int cfra,
- float * facf0, float * facf1);
+ float * facf0, float * facf1);
/* execute the effect
- sequence effects are only required to either support
- float-rects or byte-rects
- (mixed cases are handled one layer up...) */
+ sequence effects are only required to either support
+ float-rects or byte-rects
+ (mixed cases are handled one layer up...) */
void (*execute)(struct Scene *scene, struct Sequence *seq, int cfra,
- float facf0, float facf1,
- int x, int y,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3, struct ImBuf *out);
+ float facf0, float facf1,
+ int x, int y, int preview_render_size,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3, struct ImBuf *out);
};
/* ********************* prototypes *************** */
@@ -149,6 +149,7 @@
struct ImBuf *give_ibuf_seq(struct Scene *scene, int rectx, int recty, int cfra, int chanshown, int render_size);
struct ImBuf *give_ibuf_seq_threaded(struct Scene *scene, int rectx, int recty, int cfra, int chanshown, int render_size);
struct ImBuf *give_ibuf_seq_direct(struct Scene *scene, int rectx, int recty, int cfra, int render_size, struct Sequence *seq);
+struct ImBuf *give_ibuf_seqbase(struct Scene *scene, int rectx, int recty, int cfra, int chan_shown, int render_size, struct ListBase *seqbasep);
void give_ibuf_prefetch_request(int rectx, int recty, int cfra, int chanshown, int render_size);
void calc_sequence(struct Scene *scene, struct Sequence *seq);
void calc_sequence_disp(struct Scene *scene, struct Sequence *seq);
Modified: trunk/blender/source/blender/blenkernel/intern/seqeffects.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2010-04-25 10:49:13 UTC (rev 28411)
+++ trunk/blender/source/blender/blenkernel/intern/seqeffects.c 2010-04-25 12:53:39 UTC (rev 28412)
@@ -230,9 +230,10 @@
}
static void do_plugin_effect(Scene *scene, Sequence *seq, int cfra,
- float facf0, float facf1, int x, int y,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3, struct ImBuf *out)
+ float facf0, float facf1, int x, int y,
+ int preview_render_size,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3, struct ImBuf *out)
{
char *cp;
int float_rendering;
@@ -477,6 +478,7 @@
static void do_alphaover_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -644,6 +646,7 @@
static void do_alphaunder_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -763,9 +766,10 @@
/* carefull: also used by speed effect! */
static void do_cross_effect(Scene *scene, Sequence *seq, int cfra,
- float facf0, float facf1, int x, int y,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3, struct ImBuf *out)
+ float facf0, float facf1, int x, int y,
+ int preview_render_size,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3, struct ImBuf *out)
{
if (out->rect_float) {
do_cross_effect_float(
@@ -1026,6 +1030,7 @@
static void do_gammacross_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -1140,6 +1145,7 @@
static void do_add_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -1251,7 +1257,8 @@
}
static void do_sub_effect(Scene *scene, Sequence *seq, int cfra,
- float facf0, float facf1, int x, int y,
+ float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -1360,6 +1367,7 @@
static void do_drop_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf * ibuf3,
struct ImBuf *out)
@@ -1481,6 +1489,7 @@
static void do_mul_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -1931,6 +1940,7 @@
static void do_wipe_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -2075,9 +2085,10 @@
static void do_transform_effect(Scene *scene, Sequence *seq,int cfra,
- float facf0, float facf1, int x, int y,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3, struct ImBuf *out)
+ float facf0, float facf1, int x, int y,
+ int preview_render_size,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3, struct ImBuf *out)
{
do_transform(scene, seq, facf0, x, y, ibuf1, out);
}
@@ -2588,6 +2599,7 @@
static void do_glow_effect(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -2643,6 +2655,7 @@
static void do_solid_color(Scene *scene, Sequence *seq, int cfra,
float facf0, float facf1, int x, int y,
+ int preview_render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out)
{
@@ -2718,6 +2731,64 @@
}
/* **********************************************************************
+ MULTICAM
+ ********************************************************************** */
+
+/* no effect inputs for multicam, we use give_ibuf_seq */
+static int num_inputs_multicam()
+{
+ return 0;
+}
+
+static int early_out_multicam(struct Sequence *seq, float facf0, float facf1)
+{
+ return -1;
+}
+
+static void do_multicam(Scene *scene, Sequence *seq, int cfra,
+ float facf0, float facf1, int x, int y,
+ int preview_render_size,
+ struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf *ibuf3, struct ImBuf *out)
+{
+ struct ImBuf * i;
+ Editing * ed;
+ ListBase * seqbasep;
+
+ if (seq->multicam_source == 0 || seq->multicam_source >= seq->machine) {
+ return;
+ }
+
+ ed = scene->ed;
+ if (!ed) {
+ return;
+ }
+ seqbasep = seq_seqbase(&ed->seqbase, seq);
+ if (!seqbasep) {
+ return;
+ }
+
+ i = give_ibuf_seqbase(scene,
+ out->x, out->y, cfra, seq->multicam_source,
+ preview_render_size, seqbasep);
+ if (!i) {
+ return;
+ }
+
+ if (out->rect && i->rect) {
+ memcpy(out->rect, i->rect, out->x * out->y * 4);
+ } else if (out->rect_float && i->rect_float) {
+ memcpy(out->rect_float, i->rect_float, out->x * out->y *4*sizeof(float));
+ } else if (out->rect && i->rect_float) {
+ IMB_rect_from_float(i);
+ memcpy(out->rect, i->rect, out->x * out->y * 4);
+ } else if (out->rect_float && i->rect) {
+ IMB_float_from_rect(i);
+ memcpy(out->rect_float, i->rect_float, out->x * out->y *4*sizeof(float));
+ }
+}
+
+/* **********************************************************************
SPEED
********************************************************************** */
static void init_speed_effect(Sequence *seq)
@@ -2854,16 +2925,16 @@
for (cfra = 1; cfra < v->length; cfra++) {
if(fcu) {
- if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
- ctime = seq->startdisp + cfra;
- div = 1.0;
- } else {
- ctime= cfra;
- div= v->length / 100.0f;
- if(div==0.0) return;
- }
-
- facf = evaluate_fcurve(fcu, ctime/div);
+ if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
+ ctime = seq->startdisp + cfra;
+ div = 1.0;
+ } else {
+ ctime= cfra;
+ div= v->length / 100.0f;
+ if(div==0.0) return;
+ }
+
+ facf = evaluate_fcurve(fcu, ctime/div);
} else {
facf = fallback_fac;
}
@@ -2885,19 +2956,19 @@
for (cfra = 0; cfra < v->length; cfra++) {
if(fcu) {
- if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
- ctime = seq->startdisp + cfra;
- div = 1.0;
- } else {
- ctime= cfra;
- div= v->length / 100.0f;
- if(div==0.0) return;
- }
-
- facf = evaluate_fcurve(fcu, ctime / div);
- if (v->flags & SEQ_SPEED_COMPRESS_IPO_Y) {
- facf *= v->length;
- }
+ if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
+ ctime = seq->startdisp + cfra;
+ div = 1.0;
+ } else {
+ ctime= cfra;
+ div= v->length / 100.0f;
+ if(div==0.0) return;
+ }
+
+ facf = evaluate_fcurve(fcu, ctime / div);
+ if (v->flags & SEQ_SPEED_COMPRESS_IPO_Y) {
+ facf *= v->length;
+ }
}
if (!fcu) {
@@ -3005,16 +3076,20 @@
}
static void do_overdrop_effect(Scene *scene, Sequence *seq, int cfra,
- float fac, float facf,
- int x, int y, struct ImBuf * ibuf1,
- struct ImBuf * ibuf2,
- struct ImBuf * ibuf3,
- struct ImBuf * out)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list