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:
authorMichael Soluyanov <crantisz>2020-03-23 18:00:42 +0300
committerJulian Eisel <julian@blender.org>2020-03-23 18:35:29 +0300
commitc95b522856c590e31278548ec02bbac1a64e217d (patch)
tree451ee4f970def4c34ca8cab6b4eb7081865491af /source/blender/draw/intern/draw_common.c
parent88a86c025c0fb29b27b6caf7bd3873114e6e7c45 (diff)
UI: Theme options for checkerboard pattern colors and size
This patch adds ability to set up colors and size of background (transparency) checkerboard pattern in viewport and 2d editors. No new backgrounds, only changing colors in existing ones. This is not the background of the viewport, it is a transparency checkerboard that is turned on only in render mode, when the transparency mode is on. And also in 2D-editors, (image, sequencer, etc). Reviewed By: Pablo Vazquez, Julian Eisel Differential Revision: https://developer.blender.org/D6791
Diffstat (limited to 'source/blender/draw/intern/draw_common.c')
-rw-r--r--source/blender/draw/intern/draw_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c
index 0a193f20739..2be0249a2cd 100644
--- a/source/blender/draw/intern/draw_common.c
+++ b/source/blender/draw/intern/draw_common.c
@@ -91,8 +91,9 @@ void DRW_globals_update(void)
UI_GetThemeColor4fv(TH_SKIN_ROOT, gb->colorSkinRoot);
UI_GetThemeColor4fv(TH_BACK, gb->colorBackground);
UI_GetThemeColor4fv(TH_BACK_GRAD, gb->colorBackgroundGradient);
- UI_COLOR_RGBA_FROM_U8(0x26, 0x26, 0x26, 0xFF, gb->colorCheckerLow);
- UI_COLOR_RGBA_FROM_U8(0x33, 0x33, 0x33, 0xFF, gb->colorCheckerHigh);
+ UI_GetThemeColor4fv(TH_TRANSPARENT_CHECKER_PRIMARY, gb->colorCheckerPrimary);
+ UI_GetThemeColor4fv(TH_TRANSPARENT_CHECKER_SECONDARY, gb->colorCheckerSecondary);
+ gb->sizeChecker = UI_GetThemeValuef(TH_TRANSPARENT_CHECKER_SIZE);
UI_GetThemeColor4fv(TH_V3D_CLIPPING_BORDER, gb->colorClippingBorder);
/* Custom median color to slightly affect the edit mesh colors. */