diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-07 17:14:33 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-07 17:14:33 +0400 |
commit | 56e283408ace8dec9add4fa32e8f40ddeac94a36 (patch) | |
tree | e040f8bcb282574289125cedff735d4803af0688 /source/blender/blenloader | |
parent | bef6b06a47d9cdedf73324c298e038706e6eb888 (diff) |
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’s try not to forget to integrate it for 2.69.3! ;)
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 89 |
1 files changed, 43 insertions, 46 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 48c61c7db6b..e4b06aeaece 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9701,7 +9701,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - + if (!MAIN_VERSION_ATLEAST(main, 269, 1)) { /* Removal of Cycles SSS Compatible falloff */ FOREACH_NODETREE(main, ntree, id) { @@ -9718,10 +9718,38 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } 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,57 +9789,26 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - } - 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) { |