Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-08-25 13:45:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-25 13:45:16 +0300
commitf8f6f8f26eaad3b6d89a57df70114cd4fa40dc79 (patch)
tree9d4abbf6f45f1383dcdba41c28f14967da848385 /source/blender/editors/space_view3d
parent0e29a97813d2a2df77afe64d49d1683687ed37ab (diff)
parent16377abda8adb6444e888d1144d9225fa6415e65 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index c85cf689068..688bee4760b 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -703,6 +703,7 @@ void ED_view3d_draw_depth(
const EvaluationContext *eval_ctx, struct Depsgraph *graph,
ARegion *ar, View3D *v3d, bool alphaoverride)
{
+ struct bThemeState theme_state;
Scene *scene = DEG_get_evaluated_scene(graph);
RegionView3D *rv3d = ar->regiondata;
@@ -716,6 +717,10 @@ void ED_view3d_draw_depth(
U.glalphaclip = alphaoverride ? 0.5f : glalphaclip; /* not that nice but means we wont zoom into billboards */
U.obcenter_dia = 0;
+ /* Tools may request depth outside of regular drawing code. */
+ UI_Theme_Store(&theme_state);
+ UI_SetTheme(SPACE_VIEW3D, RGN_TYPE_WINDOW);
+
ED_view3d_draw_setup_view(NULL, eval_ctx, scene, ar, v3d, NULL, NULL, NULL);
glClear(GL_DEPTH_BUFFER_BIT);
@@ -751,6 +756,8 @@ void ED_view3d_draw_depth(
U.glalphaclip = glalphaclip;
v3d->flag = flag;
U.obcenter_dia = obcenter_dia;
+
+ UI_Theme_Restore(&theme_state);
}
/* ******************** background plates ***************** */