Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-20 21:25:21 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-24 13:44:27 +0300
commit62421470ee09fb70f343eb9fd48b093316c8eea1 (patch)
treeb1731334eaae926c74af685dc292f5af9532796f /source/blender/blenloader/intern/versioning_260.c
parent1978066e041424db82613cd0ba4c6a928fa878d8 (diff)
Nodes: remove group node forward compatibility with version 2.66
Forward compatibility with that version is already long gone, and removing it means we can avoid running some complicated code on every file read/write.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_260.c')
-rw-r--r--source/blender/blenloader/intern/versioning_260.c19
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;
+ }
}