diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-04-10 14:05:17 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-04-10 14:05:32 +0300 |
commit | 711a5c79d8c4105dc0ccf771b79d66c79ee3c570 (patch) | |
tree | d9f563b0cc348fe761466eaf03e6152559dece4d /source | |
parent | e073562f80121ced07db38716e996c32b0c01a45 (diff) |
Don't use vertex colors in textured mesh display during texpaint.
Wasn't that irritating?
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 755c633531d..b1f8d112765 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -588,15 +588,19 @@ static DMDrawOption draw_tface__set_draw(MTFace *tface, const bool UNUSED(has_mc return DM_DRAW_OPTION_NORMAL; } -static void update_tface_color_layer(DerivedMesh *dm) +static void update_tface_color_layer(DerivedMesh *dm, bool use_mcol) { MTFace *tface = DM_get_tessface_data_layer(dm, CD_MTFACE); MFace *mface = dm->getTessFaceArray(dm); MCol *finalCol; int i, j; - MCol *mcol = dm->getTessFaceDataArray(dm, CD_PREVIEW_MCOL); - if (!mcol) - mcol = dm->getTessFaceDataArray(dm, CD_MCOL); + MCol *mcol = NULL; + + if (use_mcol) { + mcol = dm->getTessFaceDataArray(dm, CD_PREVIEW_MCOL); + if (!mcol) + mcol = dm->getTessFaceDataArray(dm, CD_MCOL); + } if (CustomData_has_layer(&dm->faceData, CD_TEXTURE_MCOL)) { finalCol = CustomData_get_layer(&dm->faceData, CD_TEXTURE_MCOL); @@ -937,7 +941,7 @@ static void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d else { drawTFace_userData userData; - update_tface_color_layer(dm); + update_tface_color_layer(dm, !(ob->mode & OB_MODE_TEXTURE_PAINT)); userData.mf = DM_get_tessface_data_layer(dm, CD_MFACE); userData.tf = DM_get_tessface_data_layer(dm, CD_MTFACE); |