diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-09 14:14:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-09 14:14:39 +0300 |
commit | 5db950e860b2f64078cfc8cf00cb4f430b8a1baf (patch) | |
tree | b9a734351e0cfa849c3c136e4fc6f26276c7c5c0 /source/blender/editors/space_buttons | |
parent | 25074be697cb5726328aa5d064a60788c1da6aeb (diff) |
Cleanup: use workspace for object_mode when possible
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 42ff57472e7..ebb14d3caeb 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -425,10 +425,9 @@ static int buttons_context_path_brush(const bContext *C, ButsContextPath *path) scene = path->ptr[path->len - 1].data; if (scene) { - EvaluationContext eval_ctx; - CTX_data_eval_ctx(C, &eval_ctx); + const WorkSpace *workspace = CTX_wm_workspace(C); ViewLayer *view_layer = CTX_data_view_layer(C); - br = BKE_paint_brush(BKE_paint_get_active(scene, view_layer, eval_ctx.object_mode)); + br = BKE_paint_brush(BKE_paint_get_active(scene, view_layer, workspace->object_mode)); } if (br) { |