[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55535] trunk/blender/source/blender/ blenloader/intern/readfile.c: Theme fix:

Ton Roosendaal ton at blender.org
Sat Mar 23 13:46:07 CET 2013


Revision: 55535
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55535
Author:   ton
Date:     2013-03-23 12:46:07 +0000 (Sat, 23 Mar 2013)
Log Message:
-----------
Theme fix:

Node Editor and Sequencer were not using grid theme color, but 'back'.

This commit adds versioning to copy background color to grid. I do this
without increasing sub-version, which allows to add correct drawing when
the subversion has to go up anyway for something else.

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2013-03-23 10:11:29 UTC (rev 55534)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2013-03-23 12:46:07 UTC (rev 55535)
@@ -7558,10 +7558,21 @@
 	
 	if (user == NULL) return;
 	
+	if (MAIN_VERSION_OLDER(bmain, 266, 4)) {
+		bTheme *btheme;
+		
+		/* themes for Node and Sequence editor were not using grid color, but back. we copy this over then */
+		for (btheme = user->themes.first; btheme; btheme = btheme->next) {
+			copy_v4_v4_char(btheme->tnode.grid, btheme->tnode.back);
+			copy_v4_v4_char(btheme->tseq.grid, btheme->tseq.back);
+		}
+	}
+	
 	if (bmain->versionfile < 267) {
 	
 		if (!DNA_struct_elem_find(fd->filesdna, "UserDef", "short", "image_gpubuffer_limit"))
-			user->image_gpubuffer_limit = 10;
+			user->image_gpubuffer_limit = 20;
+		
 	}
 }
 static void do_versions(FileData *fd, Library *lib, Main *main)
@@ -8974,13 +8985,13 @@
 		} FOREACH_NODETREE_END
 	}
 
-	if (!MAIN_VERSION_ATLEAST(main, 266, 2)) {
+	if (MAIN_VERSION_OLDER(main, 266, 2)) {
 		FOREACH_NODETREE(main, ntree, id) {
 			do_versions_nodetree_customnodes(ntree, ((ID *)ntree == id));
 		} FOREACH_NODETREE_END
 	}
 
-	if (!MAIN_VERSION_ATLEAST(main, 266, 2)) {
+	if (MAIN_VERSION_OLDER(main, 266, 2)) {
 		bScreen *sc;
 		for (sc= main->screen.first; sc; sc= sc->id.next) {
 			ScrArea *sa;
@@ -9028,13 +9039,13 @@
 			
 			/* Only add interface nodes once.
 			 * In old Blender versions they will be removed automatically due to undefined type */
-			if (!MAIN_VERSION_ATLEAST(main, 266, 2))
+			if (MAIN_VERSION_OLDER(main, 266, 2))
 				ntree->flag |= NTREE_DO_VERSIONS_CUSTOMNODES_GROUP_CREATE_INTERFACE;
 		}
 		FOREACH_NODETREE_END
 	}
 
-	if (!MAIN_VERSION_ATLEAST(main, 266, 3)) {
+	if (MAIN_VERSION_OLDER(main, 266, 3)) {
 		{
 			/* Fix for a very old issue:
 			 * Node names were nominally made unique in r24478 (2.50.8), but the do_versions check




More information about the Bf-blender-cvs mailing list