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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-07-27 16:05:46 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-27 16:28:15 +0300
commit70966af5134b0cf53273e3c6da19ad7d5857b0f2 (patch)
treefba1f343ac327ede662580b3904042604e421d5d /source/blender/draw/intern/draw_view.c
parentd6ff77878039a5c3848482c6a82ff626d4b3872c (diff)
Workbench: option to change background
Replaced the draw world option with a shading.background_type enum. Where the user can select Theme, World or a Custom color. World and theme colors do not always work in workbench. We needed to have an option what the user could control locally (per viewport). Especially when using linked data. I removed the world background drawing from the draw_manager. It was never used as EEVEE and Workbench both override the logic. Not 100% sure about the naming of Theme, World, Viewport. In other parts of blender's codebase World is sometimes called Scene. Will stick to the names that describes its location best. {F3990139} Reviewers: fclem, campbellbarton Reviewed By: fclem Subscribers: venomgfx Tags: #bf_blender_2.8 Differential Revision: https://developer.blender.org/D3551
Diffstat (limited to 'source/blender/draw/intern/draw_view.c')
-rw-r--r--source/blender/draw/intern/draw_view.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 05aecea1d7a..95835a691a3 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -561,21 +561,12 @@ void DRW_draw_grid(void)
void DRW_draw_background(void)
{
- const DRWContextState *draw_ctx = DRW_context_state_get();
-
/* Just to make sure */
glDepthMask(GL_TRUE);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glStencilMask(0xFF);
- if ((draw_ctx->v3d->flag3 & V3D_SHOW_WORLD) &&
- (draw_ctx->scene->world != NULL))
- {
- const World *world = draw_ctx->scene->world;
- glClearColor(world->horr, world->horg, world->horb, 1.0f);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- }
- else if (UI_GetThemeValue(TH_SHOW_BACK_GRAD)) {
+ if (UI_GetThemeValue(TH_SHOW_BACK_GRAD)) {
float m[4][4];
unit_m4(m);