diff options
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r-- | source/blender/editors/interface/resources.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 4e625a75db7..009d52ea283 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -359,6 +359,12 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp = ts->handle_sel_vect; break; case TH_HANDLE_SEL_ALIGN: cp = ts->handle_sel_align; break; +#ifdef WITH_FREESTYLE + case TH_FREESTYLE_EDGE_MARK: + cp = ts->freestyle_edge_mark; break; + case TH_FREESTYLE_FACE_MARK: + cp = ts->freestyle_face_mark; break; +#endif case TH_SYNTAX_B: cp = ts->syntaxb; break; @@ -754,6 +760,10 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tv3d.button_text_hi, 255, 255, 255, 255); rgba_char_args_set(btheme->tv3d.button_title, 0, 0, 0, 255); rgba_char_args_set(btheme->tv3d.title, 0, 0, 0, 255); +#ifdef WITH_FREESTYLE + rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255); + rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51); +#endif btheme->tv3d.facedot_size = 4; @@ -2010,6 +2020,21 @@ void init_userdef_do_versions(void) } } +#ifdef WITH_FREESTYLE + /* Freestyle color settings */ + { + bTheme *btheme; + + for (btheme = U.themes.first; btheme; btheme = btheme->next) { + /* check for alpha == 0 is safe, then color was never set */ + if (btheme->tv3d.freestyle_edge_mark[3] == 0) { + rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255); + rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51); + } + } + } +#endif + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; |