diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-25 13:45:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-25 13:45:16 +0300 |
commit | f8f6f8f26eaad3b6d89a57df70114cd4fa40dc79 (patch) | |
tree | 9d4abbf6f45f1383dcdba41c28f14967da848385 /source/blender/editors/space_view3d | |
parent | 0e29a97813d2a2df77afe64d49d1683687ed37ab (diff) | |
parent | 16377abda8adb6444e888d1144d9225fa6415e65 (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.c | 7 |
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 ***************** */ |