diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-06 11:55:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-13 15:17:32 +0300 |
commit | eec5d3a8a8a26256fbae39d4f1fb01de6a648eea (patch) | |
tree | 892d48df436e59d2895251df1699a5f8b5fe8b58 /source/blender/windowmanager | |
parent | 340bfdef2e424c59e85785c1660db805b3255882 (diff) |
Depsgraph: remove engine type from evaluation context.
This was only used for viewport rendering, where we can just pass the engine
type directly. There is no technical reason why we can't draw the same depsgrpah
with different render engines.
It also led to some weird things like requiring a render engine for snapping
and raycast API functions.
Differential Revision: https://developer.blender.org/D3145
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 897a6308dd3..6591a8c9f59 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1052,16 +1052,18 @@ static ImBuf *blend_file_thumb(const bContext *C, Scene *scene, ViewLayer *view_ } /* gets scaled to BLEN_THUMB_SIZE */ + RenderEngineType *engine_type = CTX_data_engine_type(C); + if (scene->camera) { ibuf = ED_view3d_draw_offscreen_imbuf_simple( - &eval_ctx, scene, view_layer, scene->camera, + &eval_ctx, scene, view_layer, engine_type, scene->camera, BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, IB_rect, V3D_OFSDRAW_NONE, OB_SOLID, R_ALPHAPREMUL, 0, NULL, NULL, err_out); } else { ibuf = ED_view3d_draw_offscreen_imbuf( - &eval_ctx, scene, view_layer, v3d, ar, + &eval_ctx, scene, view_layer, engine_type, v3d, ar, BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, IB_rect, V3D_OFSDRAW_NONE, R_ALPHAPREMUL, 0, NULL, NULL, err_out); |