Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenkernel / intern / sequencer.c
index 669f76cf90b56a50af5d3af8e718715fbcac4ee2..bebd3d64b4478e4e7a282aa3a03e0efc7bc9bc8b 100644 (file)
@@ -63,9 +63,9 @@
 #include "BLT_translation.h"
 
 #include "BKE_animsys.h"
-#include "BKE_depsgraph.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
+#include "BKE_layer.h"
 #include "BKE_main.h"
 #include "BKE_sequencer.h"
 #include "BKE_movieclip.h"
@@ -75,6 +75,8 @@
 #include "BKE_library.h"
 #include "BKE_idprop.h"
 
+#include "DEG_depsgraph.h"
+
 #include "RNA_access.h"
 
 #include "RE_pipeline.h"
@@ -3301,10 +3303,10 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
                        context->scene->r.seq_prev_type = 3 /* == OB_SOLID */;
 
                /* opengl offscreen render */
-               BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay);
+               BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene);
                ibuf = sequencer_view3d_cb(
                        /* set for OpenGL render (NULL when scrubbing) */
-                       scene, camera, width, height, IB_rect,
+                       scene, BKE_scene_layer_render_active(scene), camera, width, height, IB_rect,
                        context->scene->r.seq_prev_type,
                        (context->scene->r.seq_flag & R_SEQ_SOLID_TEX) != 0,
                        use_gpencil, use_background, scene->r.alphamode,
@@ -3334,7 +3336,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
                        if (re == NULL)
                                re = RE_NewRender(scene->id.name);
 
-                       BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay);
+                       BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene);
                        RE_BlenderFrame(re, context->bmain, scene, NULL, camera, scene->lay, frame, false);
 
                        /* restore previous state after it was toggled on & off by RE_BlenderFrame */
@@ -3394,7 +3396,7 @@ finally:
        scene->r.subframe = orig_data.subframe;
 
        if (is_frame_update) {
-               BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay);
+               BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene);
        }
 
 #ifdef DURIAN_CAMERA_SWITCH