diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-02-19 21:11:47 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-02-19 21:12:46 +0300 |
commit | 05fd2acf895847c51d8c02166a87d9fa50def39c (patch) | |
tree | 0b0eb65f52501288f897ca1ef4eab7f29d412389 /source/blender/makesdna | |
parent | 2df040ed58fb9e80ae69f50262bb702f50f0d71f (diff) |
Theme: Radial gradient background and enum for gradient type
This commit replaces the "Use Gradient" checkbox theme option with an
enum and implements a radial background.
Whith this change, it should be easier to implemet other types of more
complex background types, like a world space oriented gradient.
Reviewed By: billreynish, fclem, brecht
Differential Revision: https://developer.blender.org/D6825
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 10 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_rename_defs.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index cd67bb3d25b..87018c8284d 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -214,7 +214,7 @@ typedef struct ThemeSpace { unsigned char back[4]; unsigned char back_grad[4]; - char show_back_grad; + char background_type; char _pad0[3]; /** Panel title. */ @@ -424,6 +424,14 @@ typedef struct ThemeSpace { } ThemeSpace; +/* Viewport Background Gradient Types. */ + +typedef enum eBackgroundGradientTypes { + TH_BACKGROUND_SINGLE_COLOR = 0, + TH_BACKGROUND_GRADIENT_LINEAR = 1, + TH_BACKGROUND_GRADIENT_RADIAL = 2, +} eBackgroundGradientTypes; + /* set of colors for use as a custom color set for Objects/Bones wire drawing */ typedef struct ThemeWireColor { unsigned char solid[4]; diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h index 404f483fde2..1ae7ad6bc70 100644 --- a/source/blender/makesdna/intern/dna_rename_defs.h +++ b/source/blender/makesdna/intern/dna_rename_defs.h @@ -109,3 +109,4 @@ DNA_STRUCT_RENAME_ELEM(bTheme, tstatusbar, space_statusbar) DNA_STRUCT_RENAME_ELEM(bTheme, ttopbar, space_topbar) DNA_STRUCT_RENAME_ELEM(bTheme, tuserpref, space_preferences) DNA_STRUCT_RENAME_ELEM(bTheme, tv3d, space_view3d) +DNA_STRUCT_RENAME_ELEM(ThemeSpace, show_back_grad, background_type) |