diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-30 19:58:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-30 19:58:43 +0300 |
commit | 188c4a22c98fb68377b881e5e20ac759ff329d85 (patch) | |
tree | 7e6d45ee4524655edc0d363e1d4e5849530e5760 /source | |
parent | e76a65e35902c128295cdf817664ab6f8d5737d5 (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 bee6e7d3df0..144ec029db1 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -208,27 +208,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); } } |