[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41691] trunk/blender/source/blender/ editors/interface/resources.c: Moving version-patches for theme/ userpref setting changes as result of

Joshua Leung aligorith at gmail.com
Wed Nov 9 04:38:38 CET 2011


Revision: 41691
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41691
Author:   aligorith
Date:     2011-11-09 03:38:36 +0000 (Wed, 09 Nov 2011)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/resources.c

Modified: trunk/blender/source/blender/editors/interface/resources.c
===================================================================
--- trunk/blender/source/blender/editors/interface/resources.c	2011-11-08 23:27:31 UTC (rev 41690)
+++ trunk/blender/source/blender/editors/interface/resources.c	2011-11-09 03:38:36 UTC (rev 41691)
@@ -1611,24 +1611,9 @@
 		}
 	}
 
-	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 @@
 
 	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 @@
 				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));




More information about the Bf-blender-cvs mailing list