diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-02-16 22:38:03 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-02-16 22:38:03 +0400 |
commit | 92436c94d3adbbfc285bd7b3041db36e66dae5d5 (patch) | |
tree | 2083c8ad4fa810a781e9631161aa88b12008453d /source/blender/blenloader | |
parent | 90ed5ea4ea278b4aadf9187e4e2b92ef3221001b (diff) | |
parent | fda8927d01ba719963154a56b45952ee541a869d (diff) |
Merged changes in the trunk up to revision 54594.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index abede57b3ce..7d6ea1be77d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8873,7 +8873,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (scene->world) { World *world = blo_do_versions_newlibadr(fd, scene->id.lib, scene->world); - if (is_zero_v3(&world->horr)) { + if (world && is_zero_v3(&world->horr)) { if ((world->skytype & WO_SKYBLEND) == 0 || is_zero_v3(&world->zenr)) { set_premul = true; } @@ -9004,13 +9004,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main) // add storage for compositor translate nodes when not existing if (!MAIN_VERSION_ATLEAST(main, 265, 10)) { bNodeTreeType *ntreetype; + bNodeTree *ntree; ntreetype = ntreeGetType(NTREE_COMPOSIT); if (ntreetype && ntreetype->foreach_nodetree) ntreetype->foreach_nodetree(main, NULL, do_version_node_fix_translate_wrapping); - } - + for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next) + do_version_node_fix_translate_wrapping(NULL, NULL, ntree); + } // if (main->versionfile < 265 || (main->versionfile == 265 && main->subversionfile < 7)) { @@ -9132,6 +9134,10 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead) bfd->user = user= read_struct(fd, bhead, "user def"); + /* User struct has separate do-version handling */ + user->versionfile = bfd->main->versionfile; + user->subversionfile = bfd->main->subversionfile; + /* read all data into fd->datamap */ bhead = read_data_into_oldnewmap(fd, bhead, "user def"); |