diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-04 17:37:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-04 17:37:07 +0400 |
commit | 83fff218cca47147183c1177de9db1381cfa48e6 (patch) | |
tree | 2576a9f8c61393a346c53eb85077ede1ba2b1d33 /source/blender/blenloader | |
parent | 69035e183ba91877489e8aae2d0425b13813ac18 (diff) | |
parent | 19dd08a4828ac1883138b2a65f0b8df1498e0d15 (diff) |
svn merge ^/trunk/blender -r55700:55776
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 58 |
2 files changed, 20 insertions, 46 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ccbe3b9beaa..c4f56b345a1 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2374,7 +2374,7 @@ static void lib_node_do_versions_group_indices(bNode *gnode) int old_index = sock->to_index; for (link = ngroup->links.first; link; link = link->next) { - if (link->tonode->type == NODE_GROUP_OUTPUT && link->fromsock->own_index == old_index) { + if (link->tonode == NULL && link->fromsock->own_index == old_index) { strcpy(sock->identifier, link->fromsock->identifier); /* deprecated */ sock->own_index = link->fromsock->own_index; @@ -2387,7 +2387,7 @@ static void lib_node_do_versions_group_indices(bNode *gnode) int old_index = sock->to_index; for (link = ngroup->links.first; link; link = link->next) { - if (link->fromnode->type == NODE_GROUP_INPUT && link->tosock->own_index == old_index) { + if (link->fromnode == NULL && link->tosock->own_index == old_index) { strcpy(sock->identifier, link->tosock->identifier); /* deprecated */ sock->own_index = link->tosock->own_index; @@ -6553,7 +6553,7 @@ static void lib_link_group(FileData *fd, Main *main) } } if (add_us) group->id.us++; - rem_from_group(group, NULL, NULL, NULL); /* removes NULL entries */ + BKE_group_object_unlink(group, NULL, NULL, NULL); /* removes NULL entries */ } } } @@ -6606,8 +6606,6 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip) clip->tracking.dopesheet.channels.first = clip->tracking.dopesheet.channels.last = NULL; clip->tracking.dopesheet.coverage_segments.first = clip->tracking.dopesheet.coverage_segments.last = NULL; - clip->prefetch_ok = FALSE; - link_list(fd, &tracking->objects); for (object = tracking->objects.first; object; object = object->next) { diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 2445775ad44..034857d7c54 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -742,22 +742,6 @@ static void do_versions_socket_default_value_259(bNodeSocket *sock) } } -static void do_versions_nodetree_default_value_259(bNodeTree *ntree) -{ - bNode *node; - bNodeSocket *sock; - for (node=ntree->nodes.first; node; node=node->next) { - for (sock = node->inputs.first; sock; sock = sock->next) - do_versions_socket_default_value_259(sock); - for (sock = node->outputs.first; sock; sock = sock->next) - do_versions_socket_default_value_259(sock); - } - for (sock = ntree->inputs.first; sock; sock = sock->next) - do_versions_socket_default_value_259(sock); - for (sock = ntree->outputs.first; sock; sock = sock->next) - do_versions_socket_default_value_259(sock); -} - void blo_do_versions_250(FileData *fd, Library *lib, Main *main) { /* WATCH IT!!!: pointers from libdata have not been converted */ @@ -2736,33 +2720,25 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 2)) { { /* Convert default socket values from bNodeStack */ - Scene *sce; - Material *mat; - Tex *tex; - bNodeTree *ntree; - - for (ntree = main->nodetree.first; ntree; ntree = ntree->id.next) { - do_versions_nodetree_default_value_259(ntree); + FOREACH_NODETREE(main, ntree, id) { + bNode *node; + bNodeSocket *sock; + + for (node=ntree->nodes.first; node; node=node->next) { + for (sock = node->inputs.first; sock; sock = sock->next) + do_versions_socket_default_value_259(sock); + for (sock = node->outputs.first; sock; sock = sock->next) + do_versions_socket_default_value_259(sock); + } + + for (sock = ntree->inputs.first; sock; sock = sock->next) + do_versions_socket_default_value_259(sock); + for (sock = ntree->outputs.first; sock; sock = sock->next) + do_versions_socket_default_value_259(sock); + ntree->update |= NTREE_UPDATE; } - - for (sce = main->scene.first; sce; sce = sce->id.next) - if (sce->nodetree) { - do_versions_nodetree_default_value_259(sce->nodetree); - sce->nodetree->update |= NTREE_UPDATE; - } - - for (mat = main->mat.first; mat; mat = mat->id.next) - if (mat->nodetree) { - do_versions_nodetree_default_value_259(mat->nodetree); - mat->nodetree->update |= NTREE_UPDATE; - } - - for (tex = main->tex.first; tex; tex = tex->id.next) - if (tex->nodetree) { - do_versions_nodetree_default_value_259(tex->nodetree); - tex->nodetree->update |= NTREE_UPDATE; - } + FOREACH_NODETREE_END } { |