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.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index ced745bb5d4..372ac976342 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -42,17 +42,12 @@
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
+#include "DNA_object_types.h"
-#include "BKE_bmfont.h"
-#include "BKE_displist.h"
#include "BKE_DerivedMesh.h"
#include "BKE_effect.h"
-#include "BKE_global.h"
#include "BKE_image.h"
-#include "BKE_main.h"
#include "BKE_material.h"
-#include "BKE_mesh.h"
-#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_property.h"
#include "BKE_utildefines.h"
@@ -62,7 +57,7 @@
#include "UI_resources.h"
-#include "gpu_buffers.h"
+#include "GPU_buffers.h"
#include "GPU_extensions.h"
#include "GPU_draw.h"
@@ -430,7 +425,7 @@ static int draw_tface__set_draw(MTFace *tface, MCol *mcol, int matnr)
} else if (tface && tface->mode&TF_OBCOL) {
return 2; /* Don't set color */
} else if (!mcol) {
- return 2; /* Don't set color */
+ return 1; /* Don't set color */
} else {
return 1; /* Set color from mcol */
}
@@ -465,9 +460,9 @@ static void add_tface_color_layer(DerivedMesh *dm)
}
} else if (tface && tface->mode&TF_OBCOL) {
for(j=0;j<4;j++) {
- finalCol[i*4+j].r = Gtexdraw.obcol[0];
- finalCol[i*4+j].g = Gtexdraw.obcol[1];
- finalCol[i*4+j].b = Gtexdraw.obcol[2];
+ finalCol[i*4+j].r = FTOCHAR(Gtexdraw.obcol[0]);
+ finalCol[i*4+j].g = FTOCHAR(Gtexdraw.obcol[1]);
+ finalCol[i*4+j].b = FTOCHAR(Gtexdraw.obcol[2]);
}
} else if (!mcol) {
if (tface) {
@@ -486,9 +481,9 @@ static void add_tface_color_layer(DerivedMesh *dm)
else copy_v3_v3(col, &ma->r);
for(j=0;j<4;j++) {
- finalCol[i*4+j].b = col[2];
- finalCol[i*4+j].g = col[1];
- finalCol[i*4+j].r = col[0];
+ finalCol[i*4+j].b = FTOCHAR(col[2]);
+ finalCol[i*4+j].g = FTOCHAR(col[1]);
+ finalCol[i*4+j].r = FTOCHAR(col[0]);
}
}
else
@@ -535,7 +530,7 @@ static int draw_em_tf_mapped__set_draw(void *userData, int index)
mcol = CustomData_em_get(&em->fdata, efa->data, CD_MCOL);
matnr = efa->mat_nr;
- return draw_tface__set_draw(tface, mcol, matnr);
+ return draw_tface__set_draw_legacy(tface, mcol, matnr);
}
static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r)