diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-30 20:42:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-30 20:42:58 +0300 |
commit | f56b7fb863522e8a61cd2ed72117c910fb73aab2 (patch) | |
tree | f088dc9304ee8b4063e7eca217df753623d72e44 /source | |
parent | 6e67d8e3bb392f26bcd99d39763e8b25e72d118f (diff) |
Cleanup: de-duplicate paint access from object
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index ed1d9519046..4681f54e26f 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -213,27 +213,8 @@ Paint *BKE_paint_get_active_from_context(const bContext *C) return &ts->imapaint.paint; } } - else if (obact) { - switch (obact->mode) { - case OB_MODE_SCULPT: - return &ts->sculpt->paint; - case OB_MODE_VERTEX_PAINT: - return &ts->vpaint->paint; - case OB_MODE_WEIGHT_PAINT: - return &ts->wpaint->paint; - case OB_MODE_TEXTURE_PAINT: - return &ts->imapaint.paint; - case OB_MODE_EDIT: - if (ts->use_uv_sculpt) - return &ts->uvsculpt->paint; - return &ts->imapaint.paint; - default: - return &ts->imapaint.paint; - } - } else { - /* default to image paint */ - return &ts->imapaint.paint; + return BKE_paint_get_active(sce, view_layer); } } |