Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 651b0edb123..0ec9e9664f6 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -152,7 +152,7 @@ static DMDrawOption draw_mesh_face_select__setHiddenOpts(void *userData, int ind
else
return DM_DRAW_OPTION_SKIP;
}
- else if(flags & eEdge_Select)
+ else if (flags & eEdge_Select)
return DM_DRAW_OPTION_NORMAL;
else
return DM_DRAW_OPTION_SKIP;
@@ -294,7 +294,8 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
if (textured!=c_textured || texface!=c_texface) {
if (textured ) {
c_badtex= !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT), alphablend);
- }else {
+ }
+ else {
GPU_set_tpage(NULL, 0, 0);
c_badtex= 0;
}
@@ -404,7 +405,7 @@ static DMDrawOption draw_tface__set_draw_legacy(MTFace *tface, int has_mcol, int
glColor3ub(0xFF, 0x00, 0xFF);
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
- else if (ma && ma->shade_flag&MA_OBCOLOR) {
+ else if (ma && (ma->shade_flag&MA_OBCOLOR)) {
glColor3ubv(Gtexdraw.obcol);
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
@@ -444,7 +445,7 @@ static DMDrawOption draw_tface__set_draw(MTFace *tface, int has_mcol, int matnr)
if (tface && set_draw_settings_cached(0, tface, ma, Gtexdraw)) {
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
- else if (tface && tface->mode&TF_OBCOL) {
+ else if (tface && (tface->mode & TF_OBCOL)) {
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
else if (!has_mcol) {
@@ -461,7 +462,7 @@ static void add_tface_color_layer(DerivedMesh *dm)
MFace *mface = dm->getTessFaceArray(dm);
MCol *finalCol;
int i,j;
- MCol *mcol = dm->getTessFaceDataArray(dm, CD_WEIGHT_MCOL);
+ MCol *mcol = dm->getTessFaceDataArray(dm, CD_PREVIEW_MCOL);
if (!mcol)
mcol = dm->getTessFaceDataArray(dm, CD_MCOL);
@@ -486,7 +487,7 @@ static void add_tface_color_layer(DerivedMesh *dm)
finalCol[i*4+j].r = 255;
}
}
- else if (tface && tface->mode&TF_OBCOL) {
+ else if (tface && (tface->mode & TF_OBCOL)) {
for (j=0;j<4;j++) {
finalCol[i*4+j].b = FTOCHAR(Gtexdraw.obcol[0]);
finalCol[i*4+j].g = FTOCHAR(Gtexdraw.obcol[1]);
@@ -694,10 +695,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
lcol = &mloopcol[mp->loopstart];
for (j = 0; j <= totloop_clamp; j++, lcol++) {
- tmp_mcol[j].a = lcol->a;
- tmp_mcol[j].r = lcol->r;
- tmp_mcol[j].g = lcol->g;
- tmp_mcol[j].b = lcol->b;
+ MESH_MLOOPCOL_TO_MCOL(lcol, &tmp_mcol[j]);
}
}