Commit: d48abb8ffd5fe64b30de47e90e20321c458a4a8a
Author: Antony Riakiotakis
Date:   Sun Jan 3 00:26:28 2016 +0100
Branches: master
https://developer.blender.org/rBd48abb8ffd5fe64b30de47e90e20321c458a4a8a

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.

===================================================================

M       source/blender/editors/space_view3d/drawmesh.c

===================================================================

diff --git a/source/blender/editors/space_view3d/drawmesh.c 
b/source/blender/editors/space_view3d/drawmesh.c
index c1821be..5c5652d 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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to