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/sculpt_paint/paint_image_proj.c | |
parent | 25074be697cb5726328aa5d064a60788c1da6aeb (diff) |
Cleanup: use workspace for object_mode when possible
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 1343ab13999..e339a4c13b6 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5941,10 +5941,9 @@ static int add_simple_uvs_exec(bContext *C, wmOperator *UNUSED(op)) static int add_simple_uvs_poll(bContext *C) { + const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = CTX_data_active_object(C); - EvaluationContext eval_ctx; - CTX_data_eval_ctx(C, &eval_ctx); - if (!ob || (ob->type != OB_MESH) || (eval_ctx.object_mode != OB_MODE_TEXTURE_PAINT)) { + if (!ob || (ob->type != OB_MESH) || (workspace->object_mode != OB_MODE_TEXTURE_PAINT)) { return false; } return true; |