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/editors/transform/transform_snap_object.c | |
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/editors/transform/transform_snap_object.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index c336cd1d31e..2a9b4790eaf 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -2079,7 +2079,7 @@ static bool snapObjectsRay( * \{ */ SnapObjectContext *ED_transform_snap_object_context_create( - Main *bmain, Scene *scene, ViewLayer *view_layer, RenderEngineType *engine_type, int flag) + Main *bmain, Scene *scene, ViewLayer *view_layer, int flag) { SnapObjectContext *sctx = MEM_callocN(sizeof(*sctx), __func__); @@ -2089,7 +2089,7 @@ SnapObjectContext *ED_transform_snap_object_context_create( sctx->scene = scene; DEG_evaluation_context_init_from_scene( - &sctx->eval_ctx, scene, view_layer, engine_type, DAG_EVAL_VIEWPORT); + &sctx->eval_ctx, scene, view_layer, DAG_EVAL_VIEWPORT); sctx->cache.object_map = BLI_ghash_ptr_new(__func__); sctx->cache.mem_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__); @@ -2098,11 +2098,11 @@ SnapObjectContext *ED_transform_snap_object_context_create( } SnapObjectContext *ED_transform_snap_object_context_create_view3d( - Main *bmain, Scene *scene, ViewLayer *view_layer, RenderEngineType *engine_type, int flag, + Main *bmain, Scene *scene, ViewLayer *view_layer, int flag, /* extra args for view3d */ const ARegion *ar, const View3D *v3d) { - SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, view_layer, engine_type, flag); + SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, view_layer, flag); sctx->use_v3d = true; sctx->v3d_data.ar = ar; |