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/sculpt_paint/sculpt.c
parent25074be697cb5726328aa5d064a60788c1da6aeb (diff)
Cleanup: use workspace for object_mode when possible
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 06705f6715d..02404ef2d8e 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4082,10 +4082,9 @@ static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss)
int sculpt_mode_poll(bContext *C)
{
- EvaluationContext eval_ctx;
- CTX_data_eval_ctx(C, &eval_ctx);
+ const WorkSpace *workspace = CTX_wm_workspace(C);
Object *ob = CTX_data_active_object(C);
- return ob && eval_ctx.object_mode & OB_MODE_SCULPT;
+ return ob && workspace->object_mode & OB_MODE_SCULPT;
}
int sculpt_mode_poll_view3d(bContext *C)