diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2016-01-03 02:26:28 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2016-01-03 02:26:28 +0300 |
commit | d48abb8ffd5fe64b30de47e90e20321c458a4a8a (patch) | |
tree | 76f897a6edb070c4cc8a240921d5613e14d30848 | |
parent | 09e3ef29c1eeb799f43dc85e97593140282a344f (diff) |
Get rid of yet another instance of DM_DRAW_OPTION_NO_MCOL
Logic here is weird. Generally, textured drawing overrides
material color unless material uses object color instead?
It doesn't make sense, material color is a material color
whatever the circumstance.
Repeating: idea as always is to push all those options out of per-
polygon callbacks and make decisions such as color enable in the higher
level functions.
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index c1821be2078..5c5652dabdd 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -560,21 +560,22 @@ static DMDrawOption draw_tface__set_draw_legacy(MTexPoly *mtexpoly, const bool h glColor3ub(0xFF, 0x00, 0xFF); return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */ } - else if (ma && (ma->shade_flag & MA_OBCOLOR)) { - glColor3ubv(Gtexdraw.obcol); - return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */ - } else if (!has_mcol) { if (mtexpoly) { glColor3f(1.0, 1.0, 1.0); } else { if (ma) { - float col[3]; - if (Gtexdraw.color_profile) linearrgb_to_srgb_v3_v3(col, &ma->r); - else copy_v3_v3(col, &ma->r); - - glColor3fv(col); + if (ma->shade_flag & MA_OBCOLOR) { + glColor3ubv(Gtexdraw.obcol); + } + else { + float col[3]; + if (Gtexdraw.color_profile) linearrgb_to_srgb_v3_v3(col, &ma->r); + else copy_v3_v3(col, &ma->r); + + glColor3fv(col); + } } else { glColor3f(1.0, 1.0, 1.0); |