[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [61189] trunk/blender/source/blender/ blenloader/intern/readfile.c: Fix the small mess in read versionning code ( we had two "pending versioning" blocks, and a triangulate one that was outside of any block, plus I think existing "pending versionning" code was not added when 2.69. 2 sub-version was created...).

Bastien Montagne montagne29 at wanadoo.fr
Thu Nov 7 14:14:33 CET 2013


Revision: 61189
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61189
Author:   mont29
Date:     2013-11-07 13:14:33 +0000 (Thu, 07 Nov 2013)
Log Message:
-----------
Fix the small mess in read versionning code (we had two "pending versioning" blocks, and a triangulate one that was outside of any block, plus I think existing "pending versionning" code was not added when 2.69.2 sub-version was created...).

Moved all non-yet-versioned stuff back into a single block at the end, let?\226?\128?\153s try not to forget to integrate it for 2.69.3! ;)

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-11-07 12:33:35 UTC (rev 61188)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2013-11-07 13:14:33 UTC (rev 61189)
@@ -9701,7 +9701,7 @@
 			}
 		}
 	}
-	
+
 	if (!MAIN_VERSION_ATLEAST(main, 269, 1)) {
 		/* Removal of Cycles SSS Compatible falloff */
 		FOREACH_NODETREE(main, ntree, id) {
@@ -9718,10 +9718,38 @@
 		} FOREACH_NODETREE_END
 	}
 
+	if (!MAIN_VERSION_ATLEAST(main, 269, 2)) {
+		/* Initialize CDL settings for Color Balance nodes */
+		FOREACH_NODETREE(main, ntree, id) {
+			if (ntree->type == NTREE_COMPOSIT) {
+				bNode *node;
+				for (node = ntree->nodes.first; node; node = node->next) {
+					if (node->type == CMP_NODE_COLORBALANCE) {
+						NodeColorBalance *n = node->storage;
+						if (node->custom1 == 0) {
+							/* LGG mode stays the same, just init CDL settings */
+							ntreeCompositColorBalanceSyncFromLGG(ntree, node);
+						}
+						else if (node->custom1 == 1) {
+							/* CDL previously used same variables as LGG, copy them over
+							 * and then sync LGG for comparable results in both modes.
+							 */
+							copy_v3_v3(n->offset, n->lift);
+							copy_v3_v3(n->power, n->gamma);
+							copy_v3_v3(n->slope, n->gain);
+							ntreeCompositColorBalanceSyncFromCDL(ntree, node);
+						}
+					}
+				}
+			}
+		} FOREACH_NODETREE_END
+	}
+
 	{
 		bScreen *sc;
 		ScrArea *sa;
 		SpaceLink *sl;
+		Scene *scene;
 
 		/* Update files using invalid (outdated) outlinevis Outliner values. */
 		for (sc = main->screen.first; sc; sc = sc->id.next) {
@@ -9761,58 +9789,27 @@
 				}
 			}
 		}
-	}
 
-	if (!DNA_struct_elem_find(fd->filesdna, "TriangulateModifierData", "int", "quad_method")) {
-		Object *ob;
-		for (ob = main->object.first; ob; ob = ob->id.next) {
-			ModifierData *md;
-			for (md = ob->modifiers.first; md; md = md->next) {
-				if (md->type == eModifierType_Triangulate) {
-					TriangulateModifierData *tmd = (TriangulateModifierData *)md;
-					if ((tmd->flag & MOD_TRIANGULATE_BEAUTY)) {
-						tmd->quad_method = MOD_TRIANGULATE_QUAD_BEAUTY;
-						tmd->ngon_method = MOD_TRIANGULATE_NGON_BEAUTY;
-					}
-					else {
-						tmd->quad_method = MOD_TRIANGULATE_QUAD_FIXED;
-						tmd->ngon_method = MOD_TRIANGULATE_NGON_SCANFILL;
-					}
-				}
-			}
-		}
-	}
-
-	if (!MAIN_VERSION_ATLEAST(main, 269, 2)) {
-		/* Initialize CDL settings for Color Balance nodes */
-		FOREACH_NODETREE(main, ntree, id) {
-			if (ntree->type == NTREE_COMPOSIT) {
-				bNode *node;
-				for (node = ntree->nodes.first; node; node = node->next) {
-					if (node->type == CMP_NODE_COLORBALANCE) {
-						NodeColorBalance *n = node->storage;
-						if (node->custom1 == 0) {
-							/* LGG mode stays the same, just init CDL settings */
-							ntreeCompositColorBalanceSyncFromLGG(ntree, node);
+		if (!DNA_struct_elem_find(fd->filesdna, "TriangulateModifierData", "int", "quad_method")) {
+			Object *ob;
+			for (ob = main->object.first; ob; ob = ob->id.next) {
+				ModifierData *md;
+				for (md = ob->modifiers.first; md; md = md->next) {
+					if (md->type == eModifierType_Triangulate) {
+						TriangulateModifierData *tmd = (TriangulateModifierData *)md;
+						if ((tmd->flag & MOD_TRIANGULATE_BEAUTY)) {
+							tmd->quad_method = MOD_TRIANGULATE_QUAD_BEAUTY;
+							tmd->ngon_method = MOD_TRIANGULATE_NGON_BEAUTY;
 						}
-						else if (node->custom1 == 1) {
-							/* CDL previously used same variables as LGG, copy them over
-							 * and then sync LGG for comparable results in both modes.
-							 */
-							copy_v3_v3(n->offset, n->lift);
-							copy_v3_v3(n->power, n->gamma);
-							copy_v3_v3(n->slope, n->gain);
-							ntreeCompositColorBalanceSyncFromCDL(ntree, node);
+						else {
+							tmd->quad_method = MOD_TRIANGULATE_QUAD_FIXED;
+							tmd->ngon_method = MOD_TRIANGULATE_NGON_SCANFILL;
 						}
 					}
 				}
 			}
-		} FOREACH_NODETREE_END
-	}
+		}
 
-	{
-		Scene *scene;
-
 		for (scene = main->scene.first; scene; scene = scene->id.next) {
 			if (scene->gm.matmode == GAME_MAT_TEXFACE) {
 				scene->gm.matmode = GAME_MAT_MULTITEX;




More information about the Bf-blender-cvs mailing list