Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-02-09 14:14:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-09 14:14:39 +0300
commit5db950e860b2f64078cfc8cf00cb4f430b8a1baf (patch)
treeb9a734351e0cfa849c3c136e4fc6f26276c7c5c0 /source/blender/editors/space_buttons/buttons_context.c
parent25074be697cb5726328aa5d064a60788c1da6aeb (diff)
Cleanup: use workspace for object_mode when possible
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c5
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) {