diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 18 |
2 files changed, 15 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index bb0ad001c34..b28a00e068b 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3046,7 +3046,7 @@ class VIEW3D_PT_view3d_shading(Panel): col.prop(view, "use_matcap") if view.use_matcap: col.template_icon_view(view, "matcap_icon") - elif view.viewport_shade == 'TEXTURED': + if view.viewport_shade == 'TEXTURED' or context.mode == 'PAINT_TEXTURE': if scene.render.use_shading_nodes or gs.material_mode != 'GLSL': col.prop(view, "show_textured_shadeless") diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 5b4322e6cf4..9fac4ca2265 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -410,9 +410,15 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O solidtex = false; Gtexdraw.is_lit = 0; } + else if ((ob->mode & OB_MODE_TEXTURE_PAINT) && BKE_scene_use_new_shading_nodes(scene)) { + solidtex = true; + if (v3d->flag2 & V3D_SHADELESS_TEX) + Gtexdraw.is_lit = 0; + else + Gtexdraw.is_lit = -1; + } else if ((v3d->drawtype == OB_SOLID) || - ((ob->mode & OB_MODE_EDIT) && (v3d->drawtype != OB_TEXTURE)) || - ((ob->mode & OB_MODE_TEXTURE_PAINT) && BKE_scene_use_new_shading_nodes(scene))) + ((ob->mode & OB_MODE_EDIT) && (v3d->drawtype != OB_TEXTURE))) { /* draw with default lights in solid draw mode and edit mode */ solidtex = true; @@ -1132,10 +1138,14 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW); else glFrontFace(GL_CCW); - if ((v3d->drawtype == OB_TEXTURE) && (v3d->flag2 & V3D_SHADELESS_TEX)) + if ((v3d->flag2 & V3D_SHADELESS_TEX) && + ((v3d->drawtype == OB_TEXTURE) || (ob->mode & OB_MODE_TEXTURE_PAINT))) + { glColor3f(1.0f, 1.0f, 1.0f); - else + } + else { glEnable(GL_LIGHTING); + } { Mesh *me = ob->data; |