== 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.)
This commit is contained in:
@@ -112,22 +112,22 @@ struct SeqEffectHandle {
|
|||||||
|
|
||||||
/* stores the y-range of the effect IPO */
|
/* stores the y-range of the effect IPO */
|
||||||
void (*store_icu_yrange)(struct Sequence * seq,
|
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 */
|
/* stores the default facf0 and facf1 if no IPO is present */
|
||||||
void (*get_default_fac)(struct Sequence *seq, int cfra,
|
void (*get_default_fac)(struct Sequence *seq, int cfra,
|
||||||
float * facf0, float * facf1);
|
float * facf0, float * facf1);
|
||||||
|
|
||||||
/* execute the effect
|
/* execute the effect
|
||||||
sequence effects are only required to either support
|
sequence effects are only required to either support
|
||||||
float-rects or byte-rects
|
float-rects or byte-rects
|
||||||
(mixed cases are handled one layer up...) */
|
(mixed cases are handled one layer up...) */
|
||||||
|
|
||||||
void (*execute)(struct Scene *scene, struct Sequence *seq, int cfra,
|
void (*execute)(struct Scene *scene, struct Sequence *seq, int cfra,
|
||||||
float facf0, float facf1,
|
float facf0, float facf1,
|
||||||
int x, int y,
|
int x, int y, int preview_render_size,
|
||||||
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out);
|
struct ImBuf *ibuf3, struct ImBuf *out);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ********************* prototypes *************** */
|
/* ********************* prototypes *************** */
|
||||||
@@ -149,6 +149,7 @@ char *give_seqname(struct Sequence *seq);
|
|||||||
struct ImBuf *give_ibuf_seq(struct Scene *scene, int rectx, int recty, int cfra, int chanshown, int render_size);
|
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_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_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 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(struct Scene *scene, struct Sequence *seq);
|
||||||
void calc_sequence_disp(struct Scene *scene, struct Sequence *seq);
|
void calc_sequence_disp(struct Scene *scene, struct Sequence *seq);
|
||||||
|
|||||||
@@ -230,9 +230,10 @@ static ImBuf * IMB_cast_away_list(ImBuf * i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void do_plugin_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_plugin_effect(Scene *scene, Sequence *seq, int cfra,
|
||||||
float facf0, float facf1, int x, int y,
|
float facf0, float facf1, int x, int y,
|
||||||
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
int preview_render_size,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
||||||
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
char *cp;
|
char *cp;
|
||||||
int float_rendering;
|
int float_rendering;
|
||||||
@@ -477,6 +478,7 @@ static void do_alphaover_effect_float(float facf0, float facf1, int x, int y,
|
|||||||
|
|
||||||
static void do_alphaover_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_alphaover_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -644,6 +646,7 @@ static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y,
|
|||||||
|
|
||||||
static void do_alphaunder_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_alphaunder_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -763,9 +766,10 @@ void do_cross_effect_float(float facf0, float facf1, int x, int y,
|
|||||||
/* carefull: also used by speed effect! */
|
/* carefull: also used by speed effect! */
|
||||||
|
|
||||||
static void do_cross_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_cross_effect(Scene *scene, Sequence *seq, int cfra,
|
||||||
float facf0, float facf1, int x, int y,
|
float facf0, float facf1, int x, int y,
|
||||||
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
int preview_render_size,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
||||||
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
if (out->rect_float) {
|
if (out->rect_float) {
|
||||||
do_cross_effect_float(
|
do_cross_effect_float(
|
||||||
@@ -1026,6 +1030,7 @@ static void do_gammacross_effect_float(float facf0, float facf1,
|
|||||||
|
|
||||||
static void do_gammacross_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_gammacross_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -1140,6 +1145,7 @@ static void do_add_effect_float(float facf0, float facf1, int x, int y,
|
|||||||
|
|
||||||
static void do_add_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_add_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -1251,7 +1257,8 @@ static void do_sub_effect_float(float facf0, float facf1, int x, int y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void do_sub_effect(Scene *scene, Sequence *seq, int cfra,
|
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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -1360,6 +1367,7 @@ static void do_drop_effect_float(float facf0, float facf1, int x, int y,
|
|||||||
|
|
||||||
static void do_drop_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_drop_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf * ibuf3,
|
struct ImBuf * ibuf3,
|
||||||
struct ImBuf *out)
|
struct ImBuf *out)
|
||||||
@@ -1481,6 +1489,7 @@ static void do_mul_effect_float(float facf0, float facf1, int x, int y,
|
|||||||
|
|
||||||
static void do_mul_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_mul_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -1931,6 +1940,7 @@ static void do_wipe_effect_float(Sequence *seq, float facf0, float facf1,
|
|||||||
|
|
||||||
static void do_wipe_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_wipe_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -2075,9 +2085,10 @@ static void do_transform(Scene *scene, Sequence *seq, float facf0, int x, int y,
|
|||||||
|
|
||||||
|
|
||||||
static void do_transform_effect(Scene *scene, Sequence *seq,int cfra,
|
static void do_transform_effect(Scene *scene, Sequence *seq,int cfra,
|
||||||
float facf0, float facf1, int x, int y,
|
float facf0, float facf1, int x, int y,
|
||||||
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
int preview_render_size,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
||||||
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
do_transform(scene, seq, facf0, x, y, ibuf1, out);
|
do_transform(scene, seq, facf0, x, y, ibuf1, out);
|
||||||
}
|
}
|
||||||
@@ -2588,6 +2599,7 @@ static void do_glow_effect_float(Sequence *seq, float facf0, float facf1,
|
|||||||
|
|
||||||
static void do_glow_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_glow_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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -2643,6 +2655,7 @@ static int early_out_color(struct Sequence *seq,
|
|||||||
|
|
||||||
static void do_solid_color(Scene *scene, Sequence *seq, int cfra,
|
static void do_solid_color(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 *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf3, struct ImBuf *out)
|
struct ImBuf *ibuf3, struct ImBuf *out)
|
||||||
{
|
{
|
||||||
@@ -2717,6 +2730,64 @@ static void do_solid_color(Scene *scene, Sequence *seq, int cfra,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* **********************************************************************
|
||||||
|
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
|
SPEED
|
||||||
********************************************************************** */
|
********************************************************************** */
|
||||||
@@ -2854,16 +2925,16 @@ void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force)
|
|||||||
|
|
||||||
for (cfra = 1; cfra < v->length; cfra++) {
|
for (cfra = 1; cfra < v->length; cfra++) {
|
||||||
if(fcu) {
|
if(fcu) {
|
||||||
if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
|
if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
|
||||||
ctime = seq->startdisp + cfra;
|
ctime = seq->startdisp + cfra;
|
||||||
div = 1.0;
|
div = 1.0;
|
||||||
} else {
|
} else {
|
||||||
ctime= cfra;
|
ctime= cfra;
|
||||||
div= v->length / 100.0f;
|
div= v->length / 100.0f;
|
||||||
if(div==0.0) return;
|
if(div==0.0) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
facf = evaluate_fcurve(fcu, ctime/div);
|
facf = evaluate_fcurve(fcu, ctime/div);
|
||||||
} else {
|
} else {
|
||||||
facf = fallback_fac;
|
facf = fallback_fac;
|
||||||
}
|
}
|
||||||
@@ -2885,19 +2956,19 @@ void sequence_effect_speed_rebuild_map(Scene *scene, Sequence * seq, int force)
|
|||||||
for (cfra = 0; cfra < v->length; cfra++) {
|
for (cfra = 0; cfra < v->length; cfra++) {
|
||||||
|
|
||||||
if(fcu) {
|
if(fcu) {
|
||||||
if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
|
if((seq->flag & SEQ_IPO_FRAME_LOCKED) != 0) {
|
||||||
ctime = seq->startdisp + cfra;
|
ctime = seq->startdisp + cfra;
|
||||||
div = 1.0;
|
div = 1.0;
|
||||||
} else {
|
} else {
|
||||||
ctime= cfra;
|
ctime= cfra;
|
||||||
div= v->length / 100.0f;
|
div= v->length / 100.0f;
|
||||||
if(div==0.0) return;
|
if(div==0.0) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
facf = evaluate_fcurve(fcu, ctime / div);
|
facf = evaluate_fcurve(fcu, ctime / div);
|
||||||
if (v->flags & SEQ_SPEED_COMPRESS_IPO_Y) {
|
if (v->flags & SEQ_SPEED_COMPRESS_IPO_Y) {
|
||||||
facf *= v->length;
|
facf *= v->length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fcu) {
|
if (!fcu) {
|
||||||
@@ -3005,16 +3076,20 @@ static void get_default_fac_fade(struct Sequence *seq, int cfra,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void do_overdrop_effect(Scene *scene, Sequence *seq, int cfra,
|
static void do_overdrop_effect(Scene *scene, Sequence *seq, int cfra,
|
||||||
float fac, float facf,
|
float fac, float facf,
|
||||||
int x, int y, struct ImBuf * ibuf1,
|
int x, int y,
|
||||||
struct ImBuf * ibuf2,
|
int preview_render_size,
|
||||||
struct ImBuf * ibuf3,
|
struct ImBuf * ibuf1,
|
||||||
struct ImBuf * out)
|
struct ImBuf * ibuf2,
|
||||||
|
struct ImBuf * ibuf3,
|
||||||
|
struct ImBuf * out)
|
||||||
{
|
{
|
||||||
do_drop_effect(scene, seq, cfra, fac, facf, x, y,
|
do_drop_effect(scene, seq, cfra, fac, facf, x, y,
|
||||||
ibuf1, ibuf2, ibuf3, out);
|
preview_render_size,
|
||||||
|
ibuf1, ibuf2, ibuf3, out);
|
||||||
do_alphaover_effect(scene, seq, cfra, fac, facf, x, y,
|
do_alphaover_effect(scene, seq, cfra, fac, facf, x, y,
|
||||||
ibuf1, ibuf2, ibuf3, out);
|
preview_render_size,
|
||||||
|
ibuf1, ibuf2, ibuf3, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
|
static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
|
||||||
@@ -3121,6 +3196,11 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
|
|||||||
rval.early_out = do_plugin_early_out;
|
rval.early_out = do_plugin_early_out;
|
||||||
rval.get_default_fac = get_default_fac_fade;
|
rval.get_default_fac = get_default_fac_fade;
|
||||||
break;
|
break;
|
||||||
|
case SEQ_MULTICAM:
|
||||||
|
rval.num_inputs = num_inputs_multicam;
|
||||||
|
rval.early_out = early_out_multicam;
|
||||||
|
rval.execute = do_multicam;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
|
|||||||
@@ -886,7 +886,8 @@ static void multibuf(ImBuf *ibuf, float fmul)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_effect(Scene *scene, int cfra, Sequence *seq, TStripElem * se)
|
static void do_effect(Scene *scene, int cfra, Sequence *seq, TStripElem * se,
|
||||||
|
int render_size)
|
||||||
{
|
{
|
||||||
TStripElem *se1, *se2, *se3;
|
TStripElem *se1, *se2, *se3;
|
||||||
float fac, facf;
|
float fac, facf;
|
||||||
@@ -920,7 +921,7 @@ static void do_effect(Scene *scene, int cfra, Sequence *seq, TStripElem * se)
|
|||||||
|
|
||||||
if (early_out == -1) { /* no input needed */
|
if (early_out == -1) { /* no input needed */
|
||||||
sh.execute(scene, seq, cfra, fac, facf,
|
sh.execute(scene, seq, cfra, fac, facf,
|
||||||
se->ibuf->x, se->ibuf->y,
|
se->ibuf->x, se->ibuf->y, render_size,
|
||||||
0, 0, 0, se->ibuf);
|
0, 0, 0, se->ibuf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1008,7 +1009,8 @@ static void do_effect(Scene *scene, int cfra, Sequence *seq, TStripElem * se)
|
|||||||
IMB_rect_from_float(se3->ibuf);
|
IMB_rect_from_float(se3->ibuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
sh.execute(scene, seq, cfra, fac, facf, x, y, se1->ibuf, se2->ibuf, se3->ibuf,
|
sh.execute(scene, seq, cfra, fac, facf, x, y, render_size,
|
||||||
|
se1->ibuf, se2->ibuf, se3->ibuf,
|
||||||
se->ibuf);
|
se->ibuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2023,7 +2025,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
|
|||||||
else
|
else
|
||||||
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rect, 0);
|
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rect, 0);
|
||||||
|
|
||||||
do_effect(scene, cfra, seq, se);
|
do_effect(scene, cfra, seq, se, render_size);
|
||||||
if (input_have_to_preprocess(scene, seq, se, cfra,
|
if (input_have_to_preprocess(scene, seq, se, cfra,
|
||||||
seqrectx, seqrecty) &&
|
seqrectx, seqrecty) &&
|
||||||
!build_proxy_run) {
|
!build_proxy_run) {
|
||||||
@@ -2362,7 +2364,7 @@ static TStripElem* do_handle_speed_effect(Scene *scene, Sequence * seq, int cfra
|
|||||||
test_and_auto_discard_ibuf(se, seqrectx, seqrecty);
|
test_and_auto_discard_ibuf(se, seqrectx, seqrecty);
|
||||||
|
|
||||||
if (se->ibuf == NULL) {
|
if (se->ibuf == NULL) {
|
||||||
se1 = do_build_seq_recursively_impl(scene, seq->seq1, cfra_left, render_size, seqrectx, seqrecty);
|
se1 = do_build_seq_recursively(scene, seq->seq1, cfra_left, render_size, seqrectx, seqrecty);
|
||||||
|
|
||||||
if((se1 && se1->ibuf && se1->ibuf->rect_float))
|
if((se1 && se1->ibuf && se1->ibuf->rect_float))
|
||||||
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rectfloat, 0);
|
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rectfloat, 0);
|
||||||
@@ -2394,8 +2396,8 @@ static TStripElem* do_handle_speed_effect(Scene *scene, Sequence * seq, int cfra
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (se->ibuf == NULL) {
|
if (se->ibuf == NULL) {
|
||||||
se1 = do_build_seq_recursively_impl(scene, seq->seq1, cfra_left, render_size, seqrectx, seqrecty);
|
se1 = do_build_seq_recursively(scene, seq->seq1, cfra_left, render_size, seqrectx, seqrecty);
|
||||||
se2 = do_build_seq_recursively_impl(scene, seq->seq1, cfra_right, render_size, seqrectx, seqrecty);
|
se2 = do_build_seq_recursively(scene, seq->seq1, cfra_right, render_size, seqrectx, seqrecty);
|
||||||
|
|
||||||
if((se1 && se1->ibuf && se1->ibuf->rect_float))
|
if((se1 && se1->ibuf && se1->ibuf->rect_float))
|
||||||
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rectfloat, 0);
|
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rectfloat, 0);
|
||||||
@@ -2411,6 +2413,7 @@ static TStripElem* do_handle_speed_effect(Scene *scene, Sequence * seq, int cfra
|
|||||||
f_cfra - (float) cfra_left,
|
f_cfra - (float) cfra_left,
|
||||||
f_cfra - (float) cfra_left,
|
f_cfra - (float) cfra_left,
|
||||||
se->ibuf->x, se->ibuf->y,
|
se->ibuf->x, se->ibuf->y,
|
||||||
|
render_size,
|
||||||
se1->ibuf, se2->ibuf, 0, se->ibuf);
|
se1->ibuf, se2->ibuf, 0, se->ibuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2450,6 +2453,11 @@ static TStripElem* do_handle_speed_effect(Scene *scene, Sequence * seq, int cfra
|
|||||||
static TStripElem* do_build_seq_recursively(Scene *scene, Sequence * seq, int cfra, int render_size, int seqrectx, int seqrecty)
|
static TStripElem* do_build_seq_recursively(Scene *scene, Sequence * seq, int cfra, int render_size, int seqrectx, int seqrecty)
|
||||||
{
|
{
|
||||||
TStripElem *se;
|
TStripElem *se;
|
||||||
|
|
||||||
|
/* BAD HACK! Seperate handling for speed effects needed, since
|
||||||
|
a) you can't just fetch a different cfra within an effect strip
|
||||||
|
b) we have to blend two frames, and CFRA is not float...
|
||||||
|
*/
|
||||||
if (seq->type == SEQ_SPEED) {
|
if (seq->type == SEQ_SPEED) {
|
||||||
se = do_handle_speed_effect(scene, seq, cfra, render_size, seqrectx, seqrecty);
|
se = do_handle_speed_effect(scene, seq, cfra, render_size, seqrectx, seqrecty);
|
||||||
} else {
|
} else {
|
||||||
@@ -2679,12 +2687,12 @@ static TStripElem* do_build_seq_array_recursively(
|
|||||||
|
|
||||||
if (swap_input) {
|
if (swap_input) {
|
||||||
sh.execute(scene, seq, cfra,
|
sh.execute(scene, seq, cfra,
|
||||||
facf, facf, x, y,
|
facf, facf, x, y, render_size,
|
||||||
se2->ibuf, se1->ibuf_comp, 0,
|
se2->ibuf, se1->ibuf_comp, 0,
|
||||||
se2->ibuf_comp);
|
se2->ibuf_comp);
|
||||||
} else {
|
} else {
|
||||||
sh.execute(scene, seq, cfra,
|
sh.execute(scene, seq, cfra,
|
||||||
facf, facf, x, y,
|
facf, facf, x, y, render_size,
|
||||||
se1->ibuf_comp, se2->ibuf, 0,
|
se1->ibuf_comp, se2->ibuf, 0,
|
||||||
se2->ibuf_comp);
|
se2->ibuf_comp);
|
||||||
}
|
}
|
||||||
@@ -2746,6 +2754,26 @@ static ImBuf *give_ibuf_seq_impl(Scene *scene, int rectx, int recty, int cfra, i
|
|||||||
return se->ibuf_comp;
|
return se->ibuf_comp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImBuf *give_ibuf_seqbase(struct Scene *scene, int rectx, int recty, int cfra, int chanshown, int render_size, ListBase *seqbasep)
|
||||||
|
{
|
||||||
|
TStripElem *se;
|
||||||
|
|
||||||
|
se = do_build_seq_array_recursively(scene, seqbasep, cfra, chanshown, render_size, rectx, recty);
|
||||||
|
|
||||||
|
if(!se) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
check_limiter_refcount_comp("give_ibuf_seqbase", se);
|
||||||
|
|
||||||
|
if (se->ibuf_comp) {
|
||||||
|
IMB_cache_limiter_unref(se->ibuf_comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return se->ibuf_comp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ImBuf *give_ibuf_seq_direct(Scene *scene, int rectx, int recty, int cfra, int render_size, Sequence *seq)
|
ImBuf *give_ibuf_seq_direct(Scene *scene, int rectx, int recty, int cfra, int render_size, Sequence *seq)
|
||||||
{
|
{
|
||||||
TStripElem* se;
|
TStripElem* se;
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, char *col)
|
|||||||
case SEQ_ALPHAUNDER:
|
case SEQ_ALPHAUNDER:
|
||||||
case SEQ_OVERDROP:
|
case SEQ_OVERDROP:
|
||||||
case SEQ_GLOW:
|
case SEQ_GLOW:
|
||||||
|
case SEQ_MULTICAM:
|
||||||
/* slightly offset hue to distinguish different effects */
|
/* slightly offset hue to distinguish different effects */
|
||||||
UI_GetThemeColor3ubv(TH_SEQ_EFFECT, col);
|
UI_GetThemeColor3ubv(TH_SEQ_EFFECT, col);
|
||||||
|
|
||||||
@@ -451,7 +452,9 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
|
|||||||
else {
|
else {
|
||||||
sprintf(str, "%d | %s", seq->len, name);
|
sprintf(str, "%d | %s", seq->len, name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if(seq->type == SEQ_MULTICAM) {
|
||||||
|
sprintf(str, "Cam: %d", seq->multicam_source);
|
||||||
}
|
}
|
||||||
else if(seq->type == SEQ_IMAGE) {
|
else if(seq->type == SEQ_IMAGE) {
|
||||||
sprintf(str, "%d | %s%s", seq->len, seq->strip->dir, seq->strip->stripdata->name);
|
sprintf(str, "%d | %s%s", seq->len, seq->strip->dir, seq->strip->stripdata->name);
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ EnumPropertyItem sequencer_prop_effect_types[] = {
|
|||||||
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
|
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", "Transform effect strip type"},
|
||||||
{SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
|
{SEQ_COLOR, "COLOR", 0, "Color", "Color effect strip type"},
|
||||||
{SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
|
{SEQ_SPEED, "SPEED", 0, "Speed", "Color effect strip type"},
|
||||||
|
{SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
|
||||||
{0, NULL, 0, NULL, NULL}
|
{0, NULL, 0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -164,10 +164,11 @@ typedef struct Sequence {
|
|||||||
|
|
||||||
struct bSound *sound; /* the linked "bSound" object */
|
struct bSound *sound; /* the linked "bSound" object */
|
||||||
void *scene_sound;
|
void *scene_sound;
|
||||||
float volume, pad;
|
float volume;
|
||||||
|
|
||||||
float level, pan; /* level in dB (0=full), pan -1..1 */
|
float level, pan; /* level in dB (0=full), pan -1..1 */
|
||||||
int scenenr; /* for scene selection */
|
int scenenr; /* for scene selection */
|
||||||
|
int multicam_source; /* for multicam source selection */
|
||||||
float strobe;
|
float strobe;
|
||||||
|
|
||||||
void *effectdata; /* Struct pointer for effect settings */
|
void *effectdata; /* Struct pointer for effect settings */
|
||||||
@@ -306,7 +307,8 @@ typedef struct SpeedControlVars {
|
|||||||
#define SEQ_TRANSFORM 27
|
#define SEQ_TRANSFORM 27
|
||||||
#define SEQ_COLOR 28
|
#define SEQ_COLOR 28
|
||||||
#define SEQ_SPEED 29
|
#define SEQ_SPEED 29
|
||||||
#define SEQ_EFFECT_MAX 29
|
#define SEQ_MULTICAM 30
|
||||||
|
#define SEQ_EFFECT_MAX 30
|
||||||
|
|
||||||
#define STRIPELEM_FAILED 0
|
#define STRIPELEM_FAILED 0
|
||||||
#define STRIPELEM_OK 1
|
#define STRIPELEM_OK 1
|
||||||
|
|||||||
@@ -316,6 +316,7 @@ extern StructRNA RNA_MotionPath;
|
|||||||
extern StructRNA RNA_MotionPathVert;
|
extern StructRNA RNA_MotionPathVert;
|
||||||
extern StructRNA RNA_MouseSensor;
|
extern StructRNA RNA_MouseSensor;
|
||||||
extern StructRNA RNA_MovieSequence;
|
extern StructRNA RNA_MovieSequence;
|
||||||
|
extern StructRNA RNA_MulticamSequence;
|
||||||
extern StructRNA RNA_MultiresModifier;
|
extern StructRNA RNA_MultiresModifier;
|
||||||
extern StructRNA RNA_MusgraveTexture;
|
extern StructRNA RNA_MusgraveTexture;
|
||||||
extern StructRNA RNA_NandController;
|
extern StructRNA RNA_NandController;
|
||||||
|
|||||||
@@ -297,6 +297,8 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
|
|||||||
case SEQ_MUL:
|
case SEQ_MUL:
|
||||||
case SEQ_OVERDROP:
|
case SEQ_OVERDROP:
|
||||||
return &RNA_EffectSequence;
|
return &RNA_EffectSequence;
|
||||||
|
case SEQ_MULTICAM:
|
||||||
|
return &RNA_MulticamSequence;
|
||||||
case SEQ_PLUGIN:
|
case SEQ_PLUGIN:
|
||||||
return &RNA_PluginSequence;
|
return &RNA_PluginSequence;
|
||||||
case SEQ_WIPE:
|
case SEQ_WIPE:
|
||||||
@@ -603,6 +605,7 @@ static void rna_def_sequence(BlenderRNA *brna)
|
|||||||
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
|
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
|
||||||
{SEQ_COLOR, "COLOR", 0, "Color", ""},
|
{SEQ_COLOR, "COLOR", 0, "Color", ""},
|
||||||
{SEQ_SPEED, "SPEED", 0, "Speed", ""},
|
{SEQ_SPEED, "SPEED", 0, "Speed", ""},
|
||||||
|
{SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
|
||||||
{0, NULL, 0, NULL, NULL}};
|
{0, NULL, 0, NULL, NULL}};
|
||||||
|
|
||||||
static const EnumPropertyItem blend_mode_items[]= {
|
static const EnumPropertyItem blend_mode_items[]= {
|
||||||
@@ -1057,6 +1060,26 @@ static void rna_def_effect(BlenderRNA *brna)
|
|||||||
rna_def_proxy(srna);
|
rna_def_proxy(srna);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void rna_def_multicam(BlenderRNA *brna)
|
||||||
|
{
|
||||||
|
StructRNA *srna;
|
||||||
|
PropertyRNA *prop;
|
||||||
|
|
||||||
|
srna = RNA_def_struct(brna, "MulticamSequence", "Sequence");
|
||||||
|
RNA_def_struct_ui_text(srna, "Multicam Select Sequence", "Sequence strip to perform multicam editing: select channel from below");
|
||||||
|
RNA_def_struct_sdna(srna, "Sequence");
|
||||||
|
|
||||||
|
prop= RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
|
||||||
|
RNA_def_property_int_sdna(prop, NULL, "multicam_source");
|
||||||
|
RNA_def_property_range(prop, 0, MAXSEQ-1);
|
||||||
|
RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
|
||||||
|
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
|
||||||
|
|
||||||
|
rna_def_filter_video(srna);
|
||||||
|
rna_def_proxy(srna);
|
||||||
|
rna_def_input(srna);
|
||||||
|
}
|
||||||
|
|
||||||
static void rna_def_plugin(BlenderRNA *brna)
|
static void rna_def_plugin(BlenderRNA *brna)
|
||||||
{
|
{
|
||||||
StructRNA *srna;
|
StructRNA *srna;
|
||||||
@@ -1305,6 +1328,7 @@ void RNA_def_sequencer(BlenderRNA *brna)
|
|||||||
rna_def_movie(brna);
|
rna_def_movie(brna);
|
||||||
rna_def_sound(brna);
|
rna_def_sound(brna);
|
||||||
rna_def_effect(brna);
|
rna_def_effect(brna);
|
||||||
|
rna_def_multicam(brna);
|
||||||
rna_def_plugin(brna);
|
rna_def_plugin(brna);
|
||||||
rna_def_wipe(brna);
|
rna_def_wipe(brna);
|
||||||
rna_def_glow(brna);
|
rna_def_glow(brna);
|
||||||
|
|||||||
Reference in New Issue
Block a user