Ignore vertex color when doing texture paint
It was totally useless to multiply diffuse color with the vertex color when doing texture painting. It was masking actual texture and only was forcing artists to create an empty vertex color layer to work this around.
This commit is contained in:
@@ -495,11 +495,12 @@ static void cdDM_drawFacesTex_common(
|
||||
CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
|
||||
const MPoly *mpoly = cddm->mpoly;
|
||||
MTexPoly *mtexpoly = DM_get_poly_data_layer(dm, CD_MTEXPOLY);
|
||||
const MLoopCol *mloopcol;
|
||||
const MLoopCol *mloopcol = NULL;
|
||||
int i;
|
||||
int colType, start_element, tot_drawn;
|
||||
const bool use_hide = (flag & DM_DRAW_SKIP_HIDDEN) != 0;
|
||||
const bool use_tface = (flag & DM_DRAW_USE_ACTIVE_UV) != 0;
|
||||
const bool use_colors = (flag & DM_DRAW_USE_COLORS) != 0;
|
||||
int totpoly;
|
||||
int next_actualFace;
|
||||
int mat_index;
|
||||
@@ -529,6 +530,7 @@ static void cdDM_drawFacesTex_common(
|
||||
}
|
||||
}
|
||||
|
||||
if (use_colors) {
|
||||
colType = CD_TEXTURE_MLOOPCOL;
|
||||
mloopcol = dm->getLoopDataArray(dm, colType);
|
||||
if (!mloopcol) {
|
||||
@@ -539,6 +541,7 @@ static void cdDM_drawFacesTex_common(
|
||||
colType = CD_MLOOPCOL;
|
||||
mloopcol = dm->getLoopDataArray(dm, colType);
|
||||
}
|
||||
}
|
||||
|
||||
GPU_vertex_setup(dm);
|
||||
GPU_normal_setup(dm);
|
||||
|
||||
@@ -3370,13 +3370,14 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
CCGKey key;
|
||||
int colType;
|
||||
const MLoopCol *mloopcol;
|
||||
const MLoopCol *mloopcol = NULL;
|
||||
MTexPoly *mtexpoly = DM_get_poly_data_layer(dm, CD_MTEXPOLY);
|
||||
DMFlagMat *faceFlags = ccgdm->faceFlags;
|
||||
DMDrawOption draw_option;
|
||||
int i, totpoly;
|
||||
bool flush;
|
||||
bool use_tface = (flag & DM_DRAW_USE_ACTIVE_UV) != 0;
|
||||
const bool use_tface = (flag & DM_DRAW_USE_ACTIVE_UV) != 0;
|
||||
const bool use_colors = (flag & DM_DRAW_USE_COLORS) != 0;
|
||||
unsigned int next_actualFace;
|
||||
unsigned int gridFaces = ccgSubSurf_getGridSize(ss) - 1;
|
||||
int mat_index;
|
||||
@@ -3395,6 +3396,7 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
|
||||
CCG_key_top_level(&key, ss);
|
||||
ccgdm_pbvh_update(ccgdm);
|
||||
|
||||
if (use_colors) {
|
||||
colType = CD_TEXTURE_MLOOPCOL;
|
||||
mloopcol = dm->getLoopDataArray(dm, colType);
|
||||
if (!mloopcol) {
|
||||
@@ -3405,6 +3407,7 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
|
||||
colType = CD_MLOOPCOL;
|
||||
mloopcol = dm->getLoopDataArray(dm, colType);
|
||||
}
|
||||
}
|
||||
|
||||
GPU_vertex_setup(dm);
|
||||
GPU_normal_setup(dm);
|
||||
|
||||
Reference in New Issue
Block a user