Cycles Merge
[blender-staging.git] / source / blender / editors / interface / resources.c
index 5f392daeec67217ca55373d628ac59b8fc3352bc..104cf18ebdfde24083363b56dd990bfd2968c689 100644 (file)
@@ -1634,8 +1634,9 @@ void init_userdef_do_versions(void)
                }
        }
 
-       {
+       if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 3)) {
                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);
@@ -1661,6 +1662,13 @@ void init_userdef_do_versions(void)
                                btheme->tclip.handle_vertex_size= 4;
                        }
                }
+
+               /* enable addon by default */
+               if(!BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module))) {
+                       bAddon *baddon= MEM_callocN(sizeof(bAddon), "bAddon");
+                       BLI_strncpy(baddon->module, "cycles", sizeof(baddon->module));
+                       BLI_addtail(&U.addons, baddon);
+               }
        }
 
        /* GL Texture Garbage Collection (variable abused above!) */