DM_DRAW_USE_ACTIVE_UV = (1 << 2),
DM_DRAW_USE_TEXPAINT_UV = (1 << 3),
DM_DRAW_SKIP_HIDDEN = (1 << 4),
+ DM_DRAW_SKIP_SELECT = (1 << 5),
} DMDrawFlag;
typedef enum DMForeachFlag {
totpoly = dm->getNumPolys(dm);
/* if we do selection, fill the selection buffer color */
- if (G.f & G_BACKBUFSEL) {
+ if ((G.f & G_BACKBUFSEL) && !(flag & DM_DRAW_SKIP_SELECT)) {
Mesh *me = userData;
unsigned int *fi_map;
}
else {
- dm->drawMappedFaces(dm, bbs_mesh_mask__setSolidDrawOptions, NULL, NULL, em->bm, 0);
+ dm->drawMappedFaces(dm, bbs_mesh_mask__setSolidDrawOptions, NULL, NULL, em->bm, DM_DRAW_SKIP_SELECT);
}
}
void WM_framebuffer_index_get(int index, int *r_col)
{
const int col = index_to_framebuffer(index);
- *r_col = ((col & 0xFF) << 24) | /* red */
- (((col >> 8) & 0xFF) << 16) | /* green */
- (((col >> 16) & 0xFF) << 8) | /* blue */
- 0xFF; /* alpha */
+ char *c_col = (char *)r_col;
+ c_col[0] = (col & 0xFF); /* red */
+ c_col[1] = ((col >> 8) & 0xFF); /* green */
+ c_col[2] = ((col >> 16) & 0xFF); /* blue */
+ c_col[3] = 0xFF; /* alpha */
}