Fix [#21257] Renders blank images when audio clip is present.
authorMatt Ebb <matt@mke3.net>
Wed, 7 Apr 2010 01:21:10 +0000 (01:21 +0000)
committerMatt Ebb <matt@mke3.net>
Wed, 7 Apr 2010 01:21:10 +0000 (01:21 +0000)
Only render sequencer when there are non-audio strips on the timeline.

source/blender/render/intern/source/pipeline.c

index f9089e7399b318b0e5d4b591cdabc1b2516c967a..dfe61b291091729d55d288573a616f3441d1a78d 100644 (file)
@@ -2403,6 +2403,24 @@ static void renderresult_stampinfo(Scene *scene)
        RE_ReleaseResultImage(re);
 }
 
+static int seq_render_active(Render *re)
+{
+       Editing *ed;
+       Sequence *seq;
+
+       ed = re->scene->ed;
+       
+       if (!(re->r.scemode & R_DOSEQ) || !ed || !ed->seqbase.first)
+               return 0;
+       
+       for (seq= ed->seqbase.first; seq; seq= seq->next) {
+               if (seq->type != SEQ_SOUND)
+                       return 1;
+       }
+       
+       return 0;
+}
+
 static void do_render_seq(Render * re)
 {
        static int recurs_depth = 0;
@@ -2484,7 +2502,7 @@ static void do_render_all_options(Render *re)
        if(external_render_3d(re, 1)) {
                /* in this case external render overrides all */
        }
-       else if((re->r.scemode & R_DOSEQ) && re->scene->ed && re->scene->ed->seqbase.first) {
+       else if(seq_render_active(re)) {
                /* note: do_render_seq() frees rect32 when sequencer returns float images */
                if(!re->test_break(re->tbh)) 
                        do_render_seq(re);