diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_260.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_260.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 8010ca8b1b8..efe052c482f 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -2566,7 +2566,7 @@ void do_versions_after_linking_260(Main *bmain) * Note: this always runs, without it links with NULL fromnode and tonode remain * which causes problems. */ - { + if (!MAIN_VERSION_ATLEAST(bmain, 266, 3)) { FOREACH_NODETREE_BEGIN (bmain, ntree, id) { bNode *input_node = NULL, *output_node = NULL; int num_inputs = 0, num_outputs = 0; @@ -2655,4 +2655,21 @@ void do_versions_after_linking_260(Main *bmain) } FOREACH_NODETREE_END; } + + if (!MAIN_VERSION_ATLEAST(bmain, 280, 59)) { + /* From this point we no longer write incomplete links for forward + * compatibility with 2.66, we have to clean them up for all previous + * versions. */ + FOREACH_NODETREE_BEGIN (bmain, ntree, id) { + bNodeLink *link, *next_link; + + for (link = ntree->links.first; link; link = next_link) { + next_link = link->next; + if (link->fromnode == NULL || link->tonode == NULL) { + nodeRemLink(ntree, link); + } + } + } + FOREACH_NODETREE_END; + } } |