Merged changes in the trunk up to revision 44039.
[blender-staging.git] / source / blender / editors / interface / resources.c
index 5eacef1478abaf037b8017038b92c794b88c98bf..0b468ef4c86065040f517c07f0a0112b0c1f5276 100644 (file)
@@ -336,6 +336,10 @@ 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;
+                       case TH_FREESTYLE_EDGE_MARK:
+                               cp= ts->freestyle_edge_mark; break;
+                       case TH_FREESTYLE_FACE_MARK:
+                               cp= ts->freestyle_face_mark; break;
                
                        case TH_SYNTAX_B:
                                cp= ts->syntaxb; break;
@@ -665,6 +669,8 @@ void ui_theme_init_default(void)
        SETCOL(btheme->tv3d.button_text_hi, 255, 255, 255, 255);
        SETCOL(btheme->tv3d.button_title, 0, 0, 0, 255);
        SETCOL(btheme->tv3d.title, 0, 0, 0, 255);
+       SETCOL(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
+       SETCOL(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
 
        btheme->tv3d.facedot_size= 4;
 
@@ -1736,6 +1742,19 @@ void init_userdef_do_versions(void)
                U.use_16bit_textures = 1;
        }
 
+       /* 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) {
+                               SETCOL(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
+                               SETCOL(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
+                       }
+               }
+       }
+
        /* GL Texture Garbage Collection (variable abused above!) */
        if (U.textimeout == 0) {
                U.texcollectrate = 60;