From 17530108f40e296a390ccf7dbc3b67354f27afa6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 Oct 2012 03:27:11 +0000 Subject: enable rendering from the sequencer again. this was working since 2.4x and shouldn't have been disabled. --- source/blender/blenkernel/intern/sequencer.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'source/blender/blenkernel/intern/sequencer.c') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index cf8569ec3d8..4a285f8a1f5 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2337,9 +2337,11 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float * -jahka */ - int rendering = G.is_rendering; - int doseq; - int doseq_gl = G.is_rendering ? /*(scene->r.seq_flag & R_SEQ_GL_REND)*/ 0 : /*(scene->r.seq_flag & R_SEQ_GL_PREV)*/ 1; + const short is_rendering = G.is_rendering; + const int do_seq_gl = G.is_rendering ? + (context.scene->r.seq_flag & R_SEQ_GL_REND) : + (context.scene->r.seq_flag & R_SEQ_GL_PREV); + int do_seq; int have_seq = FALSE; Scene *scene; @@ -2370,7 +2372,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float } /* prevent eternal loop */ - doseq = context.scene->r.scemode & R_DOSEQ; + do_seq = context.scene->r.scemode & R_DOSEQ; context.scene->r.scemode &= ~R_DOSEQ; #ifdef DURIAN_CAMERA_SWITCH @@ -2380,8 +2382,11 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float #else (void)oldmarkers; #endif - - if (sequencer_view3d_cb && BLI_thread_is_main() && doseq_gl && (scene == context.scene || have_seq == 0) && camera) { + + if ((sequencer_view3d_cb && do_seq_gl && camera) && + (BLI_thread_is_main() == TRUE) && + ((have_seq == FALSE) || (scene == context.scene))) + { char err_out[256] = "unknown"; /* for old scened this can be uninitialized, * should probably be added to do_versions at some point if the functionality stays */ @@ -2401,14 +2406,14 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float RenderResult rres; /* XXX: this if can be removed when sequence preview rendering uses the job system */ - if (rendering || context.scene != scene) { + if (is_rendering || context.scene != scene) { if (re == NULL) re = RE_NewRender(scene->id.name); RE_BlenderFrame(re, context.bmain, scene, NULL, camera, scene->lay, frame, FALSE); /* restore previous state after it was toggled on & off by RE_BlenderFrame */ - G.is_rendering = rendering; + G.is_rendering = is_rendering; } RE_AcquireResultImage(re, &rres); @@ -2435,7 +2440,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float } /* restore */ - context.scene->r.scemode |= doseq; + context.scene->r.scemode |= do_seq; scene->r.cfra = oldcfra; -- cgit v1.2.3