diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 08:10:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 10:03:28 +0300 |
commit | 28dfc47cf0b068d0103986424f79eeea59f2039b (patch) | |
tree | 5be77cc019cb6deda3416e0dc2385b48eac1232a /source/blender/editors/transform/transform_snap_object.c | |
parent | 1c600cc643306c12f2bc652b2ea921ecbb3cfadf (diff) |
Object Mode: Add to EvaluationContext & DRWContextState
Diffstat (limited to 'source/blender/editors/transform/transform_snap_object.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 8f0590eb5b9..07b45d58f37 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -2096,7 +2096,11 @@ SnapObjectContext *ED_transform_snap_object_context_create( sctx->bmain = bmain; sctx->scene = scene; - DEG_evaluation_context_init_from_scene(&sctx->eval_ctx, scene, view_layer, engine_type, DAG_EVAL_VIEWPORT); + Object *obact = OBACT(view_layer); + + DEG_evaluation_context_init_from_scene( + &sctx->eval_ctx, scene, view_layer, engine_type, + obact ? obact->mode : OB_MODE_OBJECT, DAG_EVAL_VIEWPORT); sctx->cache.object_map = BLI_ghash_ptr_new(__func__); sctx->cache.mem_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__); |