Fix T47389: WPaint + texture entirely transparent

This commit is contained in:
Campbell Barton 2016-02-11 18:48:28 +11:00
parent 5b2d0b0fb4
commit 0d71ea54d0
Notes: blender-bot 2023-02-14 08:13:42 +01:00
Referenced by issue #47389, Weight paint + texture shows entirely transparent
Referenced by issue #47385, Subsurf texture display broken in weight paint mode
1 changed files with 8 additions and 8 deletions

View File

@ -964,12 +964,6 @@ static void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d
dm->drawMappedFacesTex(dm, draw_em_tf_mapped__set_draw, compareDrawOptionsEm, &data, 0);
}
else if ((draw_flags & DRAW_FACE_SELECT) &&
(ob->mode & OB_MODE_WEIGHT_PAINT))
{
dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_facemask, GPU_object_material_bind, NULL, me,
DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH | DM_DRAW_SKIP_HIDDEN);
}
else {
DMDrawFlag dm_draw_flag;
drawTFace_userData userData;
@ -981,8 +975,14 @@ static void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d
dm_draw_flag = DM_DRAW_USE_ACTIVE_UV;
}
if ((ob->mode & OB_MODE_SCULPT) && (ob == OBACT)) {
dm_draw_flag |= DM_DRAW_SKIP_HIDDEN;
if (ob == OBACT) {
if (ob->mode & OB_MODE_WEIGHT_PAINT) {
dm_draw_flag |= DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH | DM_DRAW_SKIP_HIDDEN;
}
else if (ob->mode & OB_MODE_SCULPT) {
dm_draw_flag |= DM_DRAW_SKIP_HIDDEN;
}
}