diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-22 17:23:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-22 17:23:26 +0300 |
commit | 309f26014b6beb5aaebc0ddc51396647141d417a (patch) | |
tree | 0f9c8e6e4383fa7b4cc05cf96450f395de9150a5 /source/blender/editors/space_view3d/view3d_draw.c | |
parent | 0cc514ec845e3170a63ad837360842219e951e85 (diff) |
Use previous shading mode for border render in viewport
This way we can have border rendered part in the viewport and have
everything else material/texture shaded.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 184b9ff5b15..01e23f26568 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2608,19 +2608,20 @@ static void gpu_update_lamps_shadows_world(Scene *scene, View3D *v3d) CustomDataMask ED_view3d_datamask(const Scene *scene, const View3D *v3d) { CustomDataMask mask = 0; + const int drawtype = view3d_effective_drawtype(v3d); - if (ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) || - ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) + if (ELEM(drawtype, OB_TEXTURE, OB_MATERIAL) || + ((drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) { mask |= CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL; if (BKE_scene_use_new_shading_nodes(scene)) { - if (v3d->drawtype == OB_MATERIAL) + if (drawtype == OB_MATERIAL) mask |= CD_MASK_ORCO; } else { - if ((scene->gm.matmode == GAME_MAT_GLSL && v3d->drawtype == OB_TEXTURE) || - (v3d->drawtype == OB_MATERIAL)) + if ((scene->gm.matmode == GAME_MAT_GLSL && drawtype == OB_TEXTURE) || + (drawtype == OB_MATERIAL)) { mask |= CD_MASK_ORCO; } |