From 17dc66c1d1e9ac276e7e5bc772d23caf83e7a2d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Jul 2008 04:17:03 +0000 Subject: [#17288] Sequencer API: added a method, a geter/setter, the blend modes dict and corrected a malfunction on audio strips blend mode from Luca Bonavita (mindrones) - adds the method "rebuildProxy()" useful to rebuild all the strips at once: the user can do - adds a BlendModes dictionary under the Blender.Scene.Sequence module: the user can see the blending option with - adds the getter/setter "blendMode" - adds a function seq_can_blend in sequence.c as requested by Peter, useful for these purposes but also to solve a bug after - the bug is you can apply blend modes to an audio strip that doesn't make sense: changed the test and now you cannot assign blend mode other than Replace to audio strips Omitted DNA cleanup part since its only whitespace and Id prefer to have a useful "svn blame" output. --- source/blender/src/buttons_scene.c | 2 +- source/blender/src/sequence.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'source/blender/src') diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 1c98950080a..af90d01fb59 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -499,7 +499,7 @@ static char* seq_panel_blend_modes() so that would collide also. */ - if (!(last_seq->type & SEQ_EFFECT)) { + if ( seq_can_blend(last_seq) ) { int i; for (i = SEQ_EFFECT; i <= SEQ_EFFECT_MAX; i++) { diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index 6851929bbc2..9426548dc38 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -2380,6 +2380,16 @@ ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chanshown) return i; } +/* check used when we need to change seq->blend_mode but not to effect or audio strips */ +int seq_can_blend(Sequence *seq) +{ + if (ELEM4(seq->type, SEQ_IMAGE, SEQ_META, SEQ_SCENE, SEQ_MOVIE)) { + return 1; + } else { + return 0; + } +} + /* threading api */ static ListBase running_threads; -- cgit v1.2.3