diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-08 13:14:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-08 13:14:26 +0300 |
commit | 345c6298e995ea618c34282ba6d7ab5af032f191 (patch) | |
tree | f4fbc4798e17d0f19efc28b51a41425d0c552be8 /source/blender/editors/sculpt_paint/paint_utils.c | |
parent | 14a19fed788af0cf3695eb5def92510841056e08 (diff) |
Object Mode: move to workspace struct
- Read-only access can often use EvaluationContext.object_mode
- Write access to go to WorkSpace.object_mode.
- Some TODO's remain (marked as "TODO/OBMODE")
- Add-ons will need updating
(context.active_object.mode -> context.workspace.object_mode)
- There will be small/medium issues that still need resolving
this does work on a basic level though.
See D3037
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 1ec1e052d43..6b14f97d80c 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -566,10 +566,11 @@ static int brush_curve_preset_exec(bContext *C, wmOperator *op) Brush *br = BKE_paint_brush(BKE_paint_get_active_from_context(C)); if (br) { + const WorkSpace *workspace = CTX_wm_workspace(C); Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); BKE_brush_curve_preset(br, RNA_enum_get(op->ptr, "shape")); - BKE_paint_invalidate_cursor_overlay(scene, view_layer, br->curve); + BKE_paint_invalidate_cursor_overlay(scene, view_layer, br->curve, workspace->object_mode); } return OPERATOR_FINISHED; |