diff options
author | Michael Soluyanov <crantisz> | 2020-03-23 18:00:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-23 18:35:29 +0300 |
commit | c95b522856c590e31278548ec02bbac1a64e217d (patch) | |
tree | 451ee4f970def4c34ca8cab6b4eb7081865491af /source/blender/makesrna/intern/rna_userdef.c | |
parent | 88a86c025c0fb29b27b6caf7bd3873114e6e7c45 (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/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 34cc75396de..f68c3c3bceb 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1533,6 +1533,28 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) prop, "Text Cursor", "Color of the interface widgets text insertion cursor (caret)"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + /* Transparent Grid */ + prop = RNA_def_property(srna, "transparent_checker_primary", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "transparent_checker_primary"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text( + prop, "Primary Color", "Primary color of checkerboard pattern indicating transparent areas"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "transparent_checker_secondary", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_float_sdna(prop, NULL, "transparent_checker_secondary"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, + "Secondary Color", + "Secondary color of checkerboard pattern indicating transparent areas"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "transparent_checker_size", PROP_INT, PROP_PIXEL); + RNA_def_property_ui_text( + prop, "Checkerboard Size", "Size of checkerboard pattern indicating transparent areas"); + RNA_def_property_range(prop, 2, 48); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + /* axis */ prop = RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "xaxis"); |