Overlay: Integration of TexturePaint with Workbench

This commit is contained in:
Jeroen Bakker 2018-04-30 16:16:07 +02:00
parent 9aef2d961d
commit 5dab34df50
Notes: blender-bot 2023-02-14 10:11:49 +01:00
Referenced by issue #54924, Automatically merge vertices option dissolve a face
Referenced by issue #54906, NodeGroup input doesn't work when unconnected in Eevee renderer. (Also Cycles to a degree)
2 changed files with 6 additions and 6 deletions

View File

@ -196,11 +196,11 @@ int DRW_object_is_mode_shade(const Object *ob)
BLI_assert(ob == DST.draw_ctx.obact);
UNUSED_VARS_NDEBUG(ob);
if ((DST.draw_ctx.object_mode & OB_MODE_EDIT) == 0) {
if ((DST.draw_ctx.object_mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) > 0) {
return !(ELEM(DST.draw_ctx.v3d->drawtype, OB_MATERIAL, OB_RENDER));
}
else if (DST.draw_ctx.object_mode & (OB_MODE_TEXTURE_PAINT)) {
if ((DST.draw_ctx.v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE) == 0) {
if ((DST.draw_ctx.object_mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)) > 0) {
if (ELEM(DST.draw_ctx.v3d->drawtype, OB_MATERIAL, OB_RENDER)) {
return false;
}
else if ((DST.draw_ctx.v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE) == 0) {
return true;
}
else {

View File

@ -195,7 +195,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata)
{
/* Create a pass */
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS |
DRW_STATE_BLEND | DRW_STATE_WIRE;
DRW_STATE_MULTIPLY | DRW_STATE_WIRE;
psl->image_faces = DRW_pass_create("Image Color Pass", state);
stl->g_data->shgroup_fallback = DRW_shgroup_create(e_data.fallback_sh, psl->image_faces);