diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-07-27 16:05:46 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-27 16:28:15 +0300 |
commit | 70966af5134b0cf53273e3c6da19ad7d5857b0f2 (patch) | |
tree | fba1f343ac327ede662580b3904042604e421d5d /source/blender/makesdna/DNA_view3d_types.h | |
parent | d6ff77878039a5c3848482c6a82ff626d4b3872c (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/makesdna/DNA_view3d_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index fedc604f120..bbbaf8bb957 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -142,7 +142,9 @@ typedef struct View3DShading { short color_type; short light; - short pad[3]; + short background_type; + short pad2[2]; + char studio_light[256]; /* FILE_MAXFILE */ char matcap[256]; /* FILE_MAXFILE */ @@ -157,6 +159,10 @@ typedef struct View3DShading { float cavity_valley_factor; float cavity_ridge_factor; + + float background_color[3]; + int pad; + } View3DShading; /* 3D Viewport Overlay setings */ @@ -349,7 +355,7 @@ typedef struct View3D { /* View3d->flag3 (short) */ -#define V3D_SHOW_WORLD (1 << 0) +#define V3D_SHOW_WORLD (1 << 0) /* LEGACY replaced by V3D_SHADING_BACKGROUND_WORLD */ /* View3DShading->light */ enum { @@ -378,6 +384,13 @@ enum { V3D_SHADING_TEXTURE_COLOR = 3, }; +/* View3DShading->background_type */ +enum { + V3D_SHADING_BACKGROUND_THEME = 0, + V3D_SHADING_BACKGROUND_WORLD = 1, + V3D_SHADING_BACKGROUND_VIEWPORT = 2, +}; + /* View3DOverlay->flag */ enum { V3D_OVERLAY_FACE_ORIENTATION = (1 << 0), |