From d72a90349a84d80d585e36f4d8cdda1a2b66717f Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sun, 6 Jan 2013 16:45:10 +0000 Subject: Eyecandy feature: background gradient for 3D viewport. Enable in user preferences under themes->3D view->Theme Gradient Color. This is only used when use render only is not ticked and for now it may interfere with grid lines. Will investigate how to adjust contrast. Tidying up of options after advisory session on irc: Move all RNA code in Themes. Changes after merging trunk's commit that renders sky --- source/blender/makesdna/DNA_userdef_types.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_userdef_types.h') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 38848e30bf6..d6da03040cc 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -149,6 +149,13 @@ typedef struct uiPanelColors { int pad; } uiPanelColors; +typedef struct uiGradientColors { + char gradient[4]; + char pad[4]; + int show_grad; + int pad2; +} uiGradientColors; + typedef struct ThemeUI { /* Interface Elements (buttons, menus, icons) */ uiWidgetColors wcol_regular, wcol_tool, wcol_text; @@ -210,7 +217,9 @@ typedef struct ThemeSpace { /* note, cannot use name 'panel' because of DNA mapping old files */ uiPanelColors panelcolors; - + + uiGradientColors gradients; + char shade1[4]; char shade2[4]; @@ -437,6 +446,7 @@ typedef struct UserDef { int ndof_flag; /* flags for 3D mouse */ short ogl_multisamples; /* amount of samples for OpenGL FSA, if zero no FSA */ + short pad4; float glalphaclip; -- cgit v1.2.3 From ff6339a9799b854e145608c4ed3673227b85d971 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 7 Jan 2013 15:42:42 +0000 Subject: Make options for background gradient more organized. This was difficult to do because we group theme colours and display them together in user preferences. To make the background options more presentable and keep them grouped and separate, I needed to group the two gradient colours somehow. I added a separate ThemeSpaceGradient RNA struct as opposed to ThemeSpaceGeneric. This struct is the same as ThemeSpaceGeneric but it lacks the window background option (which does nothing now) and includes the UiGradient struct which now has both gradient colours. I modified the clear functions to use a new high colour from the gradient. Now all options appear grouped and any other editor that may use a gradient for the window background may do so. Also corrected incorrect MAIN_VERSION_ATLEAST macro, it would not detect versions correctly --- source/blender/makesdna/DNA_userdef_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_userdef_types.h') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index d6da03040cc..3027a3abd7d 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -151,7 +151,7 @@ typedef struct uiPanelColors { typedef struct uiGradientColors { char gradient[4]; - char pad[4]; + char high_gradient[4]; int show_grad; int pad2; } uiGradientColors; -- cgit v1.2.3