From c7fecab2efd3b28a18b56dbd321616728d8b7cce Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 6 Feb 2018 17:06:20 +1100 Subject: Object Mode: Use eval_ctx mode for drawing, paint & modifiers --- source/blender/editors/space_buttons/CMakeLists.txt | 1 + source/blender/editors/space_buttons/buttons_context.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_buttons') diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt index 397d79e1dbe..ec866780122 100644 --- a/source/blender/editors/space_buttons/CMakeLists.txt +++ b/source/blender/editors/space_buttons/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 8866c6b6c40..42ff57472e7 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -62,6 +62,8 @@ #include "RNA_access.h" +#include "DEG_depsgraph.h" + #include "ED_buttons.h" #include "ED_armature.h" #include "ED_screen.h" @@ -423,8 +425,10 @@ 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); ViewLayer *view_layer = CTX_data_view_layer(C); - br = BKE_paint_brush(BKE_paint_get_active(scene, view_layer)); + br = BKE_paint_brush(BKE_paint_get_active(scene, view_layer, eval_ctx.object_mode)); } if (br) { -- cgit v1.2.3