Merging r38898 through r38940 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / interface / resources.c
index 0c75518..fd44ca3 100644 (file)
@@ -161,6 +161,9 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
                        case SPACE_LOGIC:
                                ts= &btheme->tlogic;
                                break;
+                       case SPACE_CLIP:
+                               ts= &btheme->tclip;
+                               break;
                        default:
                                ts= &btheme->tv3d;
                                break;
@@ -409,6 +412,27 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
                        case TH_PREVIEW_BACK:
                                cp= ts->preview_back;
                                break;  
+
+                       case TH_MARKER_OUTLINE:
+                               cp= ts->marker_outline; break;
+                       case TH_MARKER:
+                               cp= ts->marker; break;
+                       case TH_ACT_MARKER:
+                               cp= ts->act_marker; break;
+                       case TH_SEL_MARKER:
+                               cp= ts->sel_marker; break;
+                       case TH_BUNDLE_SOLID:
+                               cp= ts->bundle_solid; break;
+                       case TH_DIS_MARKER:
+                               cp= ts->dis_marker; break;
+                       case TH_PATH_BEFORE:
+                               cp= ts->path_before; break;
+                       case TH_PATH_AFTER:
+                               cp= ts->path_after; break;
+                       case TH_CAMERA_PATH:
+                               cp= ts->camera_path; break;
+                       case TH_LOCK_MARKER:
+                               cp= ts->lock_marker; break;
                        }
                }
        }
@@ -535,6 +559,7 @@ static void ui_theme_init_new(bTheme *btheme)
        ui_theme_init_new_do(&btheme->tlogic);
        ui_theme_init_new_do(&btheme->tuserpref);
        ui_theme_init_new_do(&btheme->tconsole);
+       ui_theme_init_new_do(&btheme->tclip);
        
 }
 
@@ -640,7 +665,9 @@ void ui_theme_init_default(void)
 
        SETCOL(btheme->tv3d.bone_solid, 200, 200, 200, 255);
        SETCOL(btheme->tv3d.bone_pose, 80, 200, 255, 80);               // alpha 80 is not meant editable, used for wire+action draw
-       
+
+       SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
+       SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
        
        /* space buttons */
        /* to have something initialized */
@@ -792,6 +819,17 @@ void ui_theme_init_default(void)
        btheme->tlogic= btheme->tv3d;
        SETCOL(btheme->tlogic.back, 100, 100, 100, 255);
        
+       /* space clip */
+       btheme->tclip= btheme->tv3d;
+
+       SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
+       SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
+       SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
+       SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
+       SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
+       SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
+       SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
+       SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
 }
 
 
@@ -1554,6 +1592,30 @@ void init_userdef_do_versions(void)
                U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
        }
        
+       {
+               bTheme *btheme;
+               for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+                       if(btheme->tv3d.bundle_solid[3] == 0)
+                               SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
+
+                       if(btheme->tv3d.camera_path[3] == 0)
+                               SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
+
+                       if((btheme->tclip.back[3]) == 0) {
+                               btheme->tclip= btheme->tv3d;
+
+                               SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
+                               SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
+                               SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
+                               SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
+                               SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
+                               SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
+                               SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
+                               SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
+                       }
+               }
+       }
+
        /* GL Texture Garbage Collection (variable abused above!) */
        if (U.textimeout == 0) {
                U.texcollectrate = 60;