Fix T53156: VSE not working since Workspace > engine change

This would break if using preview in VSE. We now use the scene engine
not the workspace engine.

That said we could have the preview engine defined as part of the sequence strip
as we had for draw modes in the past. But this is a separated topic for a
separated patch.

This issue in particular was introduced in e4f2b2be26.

Note: VSE preview is still broken in two cases:
* If you have Eevee as the engine in the Scene of the Scene strip.
* If you use Clay, save the file, and re-open.
This commit is contained in:
Dalai Felinto 2017-10-25 11:02:52 -02:00
parent 4353307607
commit 6b739bc2dc
Notes: blender-bot 2023-02-14 08:42:53 +01:00
Referenced by issue #53156, Video Sequencer preview crash since workspace engine
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,8 @@
#include "BKE_context.h"
#include "BKE_sound.h"
#include "RE_engine.h"
#ifdef WITH_AUDASPACE
# include <AUD_Special.h>
#endif
@ -3308,6 +3310,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
context->scene->r.seq_prev_type = 3 /* == OB_SOLID */;
/* opengl offscreen render */
context->eval_ctx->engine = RE_engines_find(scene->view_render.engine_id);
BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene);
ibuf = sequencer_view3d_cb(
/* set for OpenGL render (NULL when scrubbing) */