diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 09:53:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 10:03:29 +0300 |
commit | 2a184f3d2b6cc180fedd0c93c266d847f7d27936 (patch) | |
tree | 5d7472cb10888e6e18dd64bbcdb3c078ac325ca0 /source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c | |
parent | 906ed54d286d0dd6686aac997883e7dfa4bba792 (diff) |
Object Mode: use eval_ctx for paint & object
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c index 1348847167c..b5d3a452d83 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c @@ -118,9 +118,11 @@ static void wpaint_prev_destroy(struct WPaintPrev *wpp) static int weight_from_bones_poll(bContext *C) { + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); Object *ob = CTX_data_active_object(C); - return (ob && (ob->mode & OB_MODE_WEIGHT_PAINT) && modifiers_isDeformedByArmature(ob)); + return (ob && (eval_ctx.object_mode & OB_MODE_WEIGHT_PAINT) && modifiers_isDeformedByArmature(ob)); } static int weight_from_bones_exec(bContext *C, wmOperator *op) |