Moving version-patches for theme/userpref setting changes as result of

GSoC11-Pepper changes forward to the version patch in place for Cycles +
Tracking.

It turns out that the original version patches introduced for these settings
were being done for the wrong version, and hence did not show in trunk as they
should have (2.59 came out before the branch was merged, so this kindof slipped
under the radar). The affected settings were:
- default handle-type (which was supposed to be "auto-clamped" but was "auto" in
trunk)
- theme settings for these handle colours
This commit is contained in:
Joshua Leung 2011-11-09 03:38:36 +00:00
parent 5a6bf231f0
commit b603e1b1ca

@ -1611,24 +1611,9 @@ void init_userdef_do_versions(void)
}
}
if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 1)) {
bTheme *btheme;
/* if new keyframes handle default is stuff "auto", make it "auto-clamped" instead */
if (U.keyhandles_new == HD_AUTO)
U.keyhandles_new = HD_AUTO_ANIM;
/* theme color additions */
for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* auto-clamped handles -> based on auto */
SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
}
}
if (bmain->versionfile < 259 || (bmain->versionfile == 259 && bmain->subversionfile < 1)) {
bTheme *btheme;
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
btheme->tv3d.speaker[3] = 255;
}
@ -1636,17 +1621,23 @@ 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 new keyframes handle default is stuff "auto", make it "auto-clamped" instead
* was changed in 260 as part of GSoC11, but version patch was wrong
*/
if (U.keyhandles_new == HD_AUTO)
U.keyhandles_new = HD_AUTO_ANIM;
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);
@ -1661,9 +1652,15 @@ void init_userdef_do_versions(void)
SETCOL(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
btheme->tclip.handle_vertex_size= 4;
}
/* auto-clamped handles -> based on auto */
if(btheme->tipo.handle_auto_clamped[3] == 0)
SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
if(btheme->tipo.handle_sel_auto_clamped[3] == 0)
SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
}
/* enable addon by default */
/* enable (Cycles) 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));